Provides methods to execute a SQL query to generate a ResultSet, or to execute a prepared SQL statement on an UltraLite database.
public PreparedStatement
The following example demonstrates how to execute a PreparedStatement, check if the execution created a ResultSet, save the ResultSet to a local variable, and close the PreparedStatement:
// Create a new PreparedStatement object from an existing connection. String sql_string = "SELECT * FROM SampleTable"; PreparedStatement ps = conn.prepareStatement(sql_string); // result returns true if the execute statement runs successfully. boolean result = ps.execute(); // Check if the PreparedStatement contains a ResultSet. if (ps.hasResultSet()) { // Store the ResultSet in the rs variable. ResultSet rs = ps.getResultSet; } // Close the PreparedStatement to release resources. ps.close(); |
All members of PreparedStatement, including all inherited members.
close function
execute function
executeQuery function
getPlan function
getResultSet function
getUpdateCount function
hasResultSet function
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |