|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.rio.MVADualResultSet
public class MVADualResultSet
A dual result set provides simultaneous access to unformatted and server-side
formatted data. This behavior is different from the standard ResultSet,
in which the JDBC driver does the conversion when a String representation is
requested on a non-Sting data type.
Note, a dual result set can only be created by direct access to a SAS data set; a dual result set can not be formed by a SQL SELECT query.
Calling #getString returns the server-side formatted value. All other
getters, including #getObject, return the unformatted value.
The following example shows how to create a MVADualResultSet given
an open MVAStatement:
MVADualResultSet mvaResultSet = mvaStatement.createDualResultSet(
"WORK", "TESTDS", null, null);
String s = mvaResultSet.getString(1); // get server side formatted value
double d = mvaResultSet.getDouble(1); // get field as double precision
| Field Summary |
|---|
| Fields inherited from class com.sas.rio.MVAResultSet |
|---|
_concurrency, _type, _warnings, _wasNull, CHARACTER, DATE, DATETIME, initialFetchSize, INTEGER, m_columnCount, m_maxRows, m_rowCache, m_statement, MAX_FIELD_SIZE, MAYBE_INTEGER, NOSUBTYPE, NUMERIC, TIME |
| Method Summary | |
|---|---|
com.sas.MissingValues |
getMissingValue(int columnIndex)
Retrieves the value of the designated column in the current row of this MVADualResultSet object as
an official official SAS missing value. |
java.lang.String |
getString(int columnIndex)
Gets the value of a column in the current row as a Java String. |
java.lang.String |
getString(java.lang.String columnLabel)
Gets the value of a column in the current row as a Java String. |
| Method Detail |
|---|
public com.sas.MissingValues getMissingValue(int columnIndex)
throws java.sql.SQLException
MVADualResultSet object as
an official official SAS missing value.
This routine supports both numeric and character MissingValues.
If the field is not a SAS missing value, then null is returned.
getMissingValue in interface com.sas.sql.DualResultSetcolumnIndex - the first column is 1, the second is 2, ...
java.sql.SQLException
public java.lang.String getString(int columnIndex)
throws java.sql.SQLException
MVAResultSet
getString in interface com.sas.sql.DualResultSetgetString in interface java.sql.ResultSetgetString in class MVAResultSetcolumnIndex - The first column is 1, the second is 2, and so on.
java.sql.SQLException - This exception is thrown if the column value is
not valid.
public java.lang.String getString(java.lang.String columnLabel)
throws java.sql.SQLException
MVAResultSet
getString in interface com.sas.sql.DualResultSetgetString in interface java.sql.ResultSetgetString in class MVAResultSetcolumnLabel - The name of the column that is returned by the
ResultSetMetaData object.
java.sql.SQLException - This exception is thrown if the column value is
not valid.
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||