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()
Copyright © Cloud Software Group, Inc. All rights reserved.