on 08-02-2011 1:54 PM
Hi Experts!
Can you give me an example code part of using a SQL select query in a validation script?
My aim is to query an extension table with a parameterized select and extract a single field value,
which can be used for further processing.
Regards,
Zolchee
Hi
Plz take a look at IapiDbHandleIfc. There are many methods like "beginTransaction()", "executeQuery" etc. that can take care of your requirements.
Regards
Mudit Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
import com.frictionless.api.common.platform.IapiDbHandleIfc;
dbHandle = session.getDbHandle();
dbHandle.beginTransaction();
sQuery = "SELECT DOC_DESCRIPTION " +
"FROM " +
"FCI_CUSTOM_MD2 " +
"WHERE " +
"EID = '" + sParameter + "'";
dbHandle.executeQuery(sQuery);
This is an example how the query should look like, but can you please tell me how to use the results of the query?
Are the results stored in a ResultSet? How to extract them? The above query should return only one item - how to get that?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.