Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# queryUsingPreparedStmt()

Use `queryUsingPreparedStmt()` to query the database using prepared statements.

Syntax

    Concept[] queryUsingPreparedStmt(String conceptURI, String preparedStmt, Object[] args,boolean queryChildren)

Here, `conceptURI` is the URI of the result concept type, `preparedStmt` is the prepared statement to be executed, and `args Object[]` are the positional values to be used for binding to the prepared statement. If `queryChildren boolean` is set to `true`, the concept properties are recursively queried. The function returns an array of concepts matching the query.

## Example

    Database.setCurrentConnection("/SharedResources/Mainframe");
    Database.beginTransaction();
    String stm="delete from ACME1.TABLE_BETA where ID1=?";
    Object []o3 ={3};
    int cnt_prepare_delete=Database.executePreparedStmt(stm,o3);
    System.debugOut("output of function executePreparedStmt(delete) is " + cnt_prepare_delete);
    Database.commit();
    Database.unsetConnection()

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.