Provides methods to return the column value of a given row.
public CollectionOfValueReaders
The returned results are based on a SQL SELECT statement, which is declared by a PreparedStatement, and are stored in a ResultSet.
Values returned by any given method in this interface are accessed based on the integer parameter, ordinal, which specifies the column order as it appears in the SQL SELECT statement. The ordinal has a base index of one.
Values are returned as either java primitive types or read-only Value objects.
The following example demonstrates how to declare a new PreparedStatement with a SQL SELECT statement, execute the statement, store the query results in a new ResultSet, and store a column1 value as a String using a get method.
// Define a new SQL SELECT statement. String sql_string = "SELECT column1, column2 FROM SampleTable"; // Create a new PreparedStatement from an existing connection. PreparedStatement ps = conn.prepareStatement(sql_string); // Create a new ResultSet to contain the query results of the SQL statement. ResultSet rs = ps.executeQuery(); // Check if the PreparedStatement contains a ResultSet. if (ps.hasResultSet()) { // Retrieve the column1 value using getString. String row1_col1 = rs.getString(1); } |
All members of CollectionOfValueReaders, including all inherited members.
getBlobInputStream function
getBoolean function
getBytes function
getClobReader function
getDate function
getDecimalNumber function
getDouble function
getFloat function
getInt function
getLong function
getOrdinal function
getString function
getValue function
isNull function
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |