Activity Type: Relational
Run an SQL query on a relational data resource. Note that output from this activity must be converted into a string representation, e.g. using the SQLResultsToXML activity, before it can be delivered in the response or to an output stream.
<sqlQueryStatement name="statement">
  <!-- value of first parameter -->
  <sqlParameter position="1" from="idvalue"/>
  <!-- value of second parameter -->
  <sqlParameter position="2">321</sqlParameter>
  <expression>
    select * from littleblackbook where id <= ? and id >= ?
  </expression>
  <resultStream name="statementResponse"/>
</sqlQueryStatement>
Element sqlQueryStatement:
<sqlParameter position ="1" from="inputStream"/> <sqlParameter position ="3" from="inputStream"/> <sqlParameter position ="2" from="inputStream"/>
This means inputStream must first deliver parameter 1 then parameter 3 then parameter 2.
Note that providing an SQL update statement will cause an exception to be thrown. If the database driver used by OGSA-DAI to communicate with the database supports read-only connections then the database will not be modified. If however, the driver does not support read-only connections then the database will be modified.
This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.JDBCConnectionProvider
OGSA-DAI/schema/ogsadai/xsd/activities/sql_query_statement.xsd
uk.org.ogsadai.activity.sql.SQLQueryStatementActivity
uk.org.ogsadai.client.toolkit.activity.sql.SQLQuery
| Up: Activities | ||
| © International Business Machines Corporation, 2002-2006 | © The University of Edinburgh, 2002-2006 |