PreparedStatement interface

Provides methods to execute a SQL query to generate a ResultSet, or to execute a prepared SQL statement on an UltraLite database.

Syntax
public PreparedStatement
Base classes
Remarks

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();
Members

All members of PreparedStatement, including all inherited members.


close function
execute function
executeQuery function
getPlan function
getResultSet function
getUpdateCount function
hasResultSet function