|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
The object used for executing a static SQL statement and obtaining the results produced by it.
| Field Summary | |
static int |
NOT_NULL_INDICATOR
Constant to indicate the NOT NUll INDICATOR |
static int |
NULL_INDICATOR
Constant to indicate the NUll INDICATOR |
static int |
SQL_ALL_TYPES
Constant to indicate to define all the Data Types |
static int |
SQL_SCOPE_CURROW
Constant to indicate that the rowid is guaranteed to be valid only while positioned on that row. |
static int |
SQL_SCOPE_SESSION
Constant to indicate that the rowid is guaranteed to be valid for the duration of the session (across transaction boundaries). |
static int |
SQL_SCOPE_TRANSACTION
Constant to indicate that the rowid is guaranteed to be valid for the duration of the current transaction. |
static int |
SQLDRV_BUFFER_FULL
Constant to indicate results in current buffer are completely returned. |
static int |
SQLDRV_EOS
Constant to indicate that all results are returned. |
static int |
SQLDRV_ERROR
Constant to indicate Failure from IP routine. |
static int |
SQLDRV_INFO_NEXT_RESULT_SET_AVAILABLE
Constant to check and see if more result sets are available for the current statement. |
static int |
SQLDRV_INFO_OUTPUT_RESULT_SET_AVAILABLE
Constant to check whether it had a return code and/or output parameters for the current statement report. |
static int |
SQLDRV_NOT_AVAILABLE
Constant to indicate that Driver functionality is not available |
static int |
SQLDRV_NTS
Constant to indicate the NULL Terminated String |
static int |
SQLDRV_SUCCESS
Constant to indicate Success from IP routine |
static int |
SQLIP_COL_ATTRIB_HIDDEN
Constant to indicate that the column is a hidden field. |
static int |
SQLIP_COL_ATTRIB_KEY
Constant to indicate that column is a index field. |
static int |
SQLIP_EOS
Constant to Indicate IP Routine has nor more error exists. |
static int |
SQLIP_ERROR
Constant to Indicate IP Routine had an Error |
static int |
SQLIP_FAILURE
Constant to Indicate IP Routine had an Error |
static int |
SQLIP_SUCCESS
Constant to Indicate IP Routine was succesful |
static int |
UL_TM_ERRORS
Constant to indicate message type as "General Errors" in either the protocol or application. |
static int |
UL_TM_F_TRACE
Constant to indicate message type as function call trace. |
static int |
UL_TM_FATAL
Constant to indicate message type as "FATAL" error |
static int |
UL_TM_INFO
Constant to indicate message type as general info to give details about the events. |
static int |
UL_TM_MAJOR_EV
Constant to indicate message type as major protocol or application events to give the big picture. |
static int |
UL_TM_MINOR_EV
Constant to indicate message type as minor or secondary protocol or application events to give more detail. |
static int |
UL_TM_PARM
Constant to indicate message type as "Bad or missing Parameter" passed. |
static int |
UL_TM_SNO
Constant to indicate message type as "Should not occur" error, usually caused by programmer or spec error |
static int |
UL_TM_TRIVIA
Constant to indicate message type as trivial info of value only to the implementor. |
static int |
XO_NO_NULLS
Constant to indicate the Nullable field |
static int |
XO_NTS
Constant to indicate the data as Null Terminated String |
static int |
XO_NULL_DATA
Constant to indicate the data as NULL DATA |
static int |
XO_NULLABLE
Constant to indicate that the column can have NULL values |
static int |
XO_NULLABLE_UNKNOWN
Constant to indicate that the column's NULL value property is not known. |
static int |
XO_TM_DAY_OF_MONTH
Constant to indicate the index into the date object array for DAY OF THE MONTH |
static int |
XO_TM_DAY_OF_WEEK
Constant to indicate the index into the date object array for DAY OF THE WEEK |
static int |
XO_TM_DAY_OF_YEAR
Constant to indicate the index into the date object array for DAY OF THE YEAR |
static int |
XO_TM_FRACTION
Constant to indicate the index into the date object array for number of billionths of a second |
static int |
XO_TM_HOUR
Constant to indicate the index into the date object array for HOUR |
static int |
XO_TM_IS_DST
Constant to indicate the index into the date object array for DayLight Savings Time |
static int |
XO_TM_MINUTE
Constant to indicate the index into the date object array for MINUTE |
static int |
XO_TM_MONTH
Constant to indicate the index into the date object array for MONTH |
static int |
XO_TM_SECOND
Constant to indicate the index into the date object array for SECOND |
static int |
XO_TM_YEAR
Constant to indicate the index into the date object array for YEAR |
static int |
XO_TYPE_BIGINT
Constant to indicate the data type is BIG INT |
static int |
XO_TYPE_BINARY
Constant to indicate the data type is BINARY |
static int |
XO_TYPE_BIT
Constant to indicate the data type is BIT |
static int |
XO_TYPE_CHAR
Constant to indicate the data type is CHAR |
static int |
XO_TYPE_DATE
Constant to indicate the data type is DATE |
static int |
XO_TYPE_DECIMAL
Constant to indicate the data type is DECIMAL |
static int |
XO_TYPE_DEFAULT
Constant to indicate the data type is DEFAULT |
static int |
XO_TYPE_DOUBLE
Constant to indicate the data type is DOUBLE |
static int |
XO_TYPE_FLOAT
Constant to indicate the data type is FLOAT |
static int |
XO_TYPE_INTEGER
Constant to indicate the data type is INTEGER |
static int |
XO_TYPE_LONGVARBINARY
Constant to indicate the data type is LONG VAR BINARY |
static int |
XO_TYPE_LONGVARCHAR
Constant to indicate the data type is LONG VARCHAR |
static int |
XO_TYPE_NUMERIC
Constant to indicate the data type is NUMERIC |
static int |
XO_TYPE_REAL
Constant to indicate the data type is REAL |
static int |
XO_TYPE_SMALL
Constant to indicate the data type is SMALL |
static int |
XO_TYPE_SMALLINT
Constant to indicate the data type is SMALL INT |
static int |
XO_TYPE_TIME
Constant to indicate the data type is TIME |
static int |
XO_TYPE_TIMESTAMP
Constant to indicate the data type is TIMESTAMP |
static int |
XO_TYPE_TINYINT
Constant to indicate the data type is TINY INT |
static int |
XO_TYPE_VARBINARY
Constant to indicate the data type is VAR BINARY |
static int |
XO_TYPE_VARCHAR
Constant to indicate the data type is VARCHAR |
static int |
XO_TYPE_VARIANT
Constant to indicate the data type is VARIANT |
| Method Summary | |
int |
sqlipBestRowIdentifier(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
int scope,
boolean nullable)
Called by the OpenAccess layer to get a table's optimal set of columns that uniquely identifies a row. |
int |
sqlipCatalogs()
Close the cursor and clear the result table. |
int |
sqlipCloseCursor()
Close the cursor and clear the result table. |
int |
sqlipCloseStmt()
Close the current statement and free all resources used to execute commands on it. |
int |
sqlipColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column)
Called by the OpenAccess layer to get column list. |
int |
sqlipDeclareCursor(java.lang.String psCursorName)
Associate the cursor name with the prepared statement. |
int |
sqlipError(java.lang.StringBuffer sSqlState,
xo_int piNativeError,
java.lang.StringBuffer sErrorText)
Return the error during the last operation on this object. |
int |
sqlipFetchRow()
Fetch data at the current cursor position and advance the cursor to the next row of the result table. |
int |
sqlipForeignKeys(java.lang.String primaryCatalog,
java.lang.String primarySchema,
java.lang.String primaryTable,
java.lang.String foreignCatalog,
java.lang.String foreignSchema,
java.lang.String foreignTable)
Called by the OpenAccess layer to get foreign key list. |
int |
sqlipGetColspec(int iColNum,
xo_int piXODataType,
xo_int pbNullable,
java.lang.StringBuffer pColName,
xo_int piLen,
xo_int piPrecision,
xo_int piScale,
xo_col_attribute pColAttributes,
xo_int iFlags)
Returns the description for the specified column. |
java.lang.Object |
sqlipGetColval(int iColNum,
xo_int piXODataType,
xo_int piIndicator,
xo_int piStatus)
Returns the value of the specified column for the current row. |
int |
sqlipGetInfo(int iInfoType,
java.lang.StringBuffer sInfoValue)
Called by the OpenAccess layer to request information from the IP. |
int |
sqlipGetNumcols(xo_int piNumCols)
Return the number of columns in the result set. |
int |
sqlipGetNumparams(xo_int piNumParams)
Returns the number of parameter markers in the prepared stmt. |
int |
sqlipGetParamSpec(int iParmNum,
xo_int iXoDataType,
xo_int piNullable,
xo_int piLen,
xo_int piPrecision,
xo_int piScale,
xo_int piDirection,
xo_int piFlags)
Returns the description for the specified parameter. |
int |
sqlipIndexInfo(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
boolean unique,
boolean approximate)
Close the cursor and clear the result table. |
int |
sqlipInitParam(int iParam,
int iIndicator,
java.lang.String sValAsStr,
int iXODataType)
This function will be called for each input parameter that has been specified by the client application. |
int |
sqlipIsCursorOpen(xo_int piCursorOpen)
Check if the cursor is open. |
int |
sqlipMapToXoType(int iJavaType)
Called by the OpenAccess layer to map database specific data type to OpenAccess data type during the fetching of rows from a schema request. |
int |
sqlipOpenCursor(xo_int piNumResRows)
This function is called to execute both SELECT and non-select prepared statements. |
int |
sqlipOpenNextCursor(xo_int piNumResRows)
If the statement has more results pending then move to the next result. |
int |
sqlipOpenOutputCursor(xo_int piNumResRows)
If the statement is a stored procedure call and it has output parameters and/or output return value then this function should return a cursor for accessing this information. |
int |
sqlipPrepareStmt(java.lang.String sSqlStmt)
Parse the given SQL stmt (check any syntax errors) and generate plan for executing the statement. |
int |
sqlipPrimaryKeys(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Called by the OpenAccess layer to get primary key list. |
int |
sqlipProcedureColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String procedure,
java.lang.String column)
Called by the OpenAccess layer to get store procedure column list. |
int |
sqlipProcedures(java.lang.String catalog,
java.lang.String schema,
java.lang.String procedure)
Called by the OpenAccess layer to get store procedure list. |
int |
sqlipSchemas()
Called by the OpenAccess layer to get catalog list. |
int |
sqlipSetInfo(java.lang.String pCmdArgs)
Called by the OpenAccess layer to inform the IP of various connection and statement level options like the maximum number of rows to return, transaction commit mode, query timeout, etc. |
int |
sqlipTables(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String types)
Called by the OpenAccess layer to get table list. |
int |
sqlipTableTypes()
Called by the OpenAccess layer to get table type list. |
int |
sqlipTypeInfo(int type)
Called by the OpenAccess layer to get data type list. |
int |
sqlipVersionColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Called by the OpenAccess layer to get a table's columns that are automatically updated when any value in a row is updated. |
| Field Detail |
public static final int SQLDRV_SUCCESS
public static final int SQLDRV_EOS
public static final int SQLDRV_BUFFER_FULL
public static final int SQLDRV_ERROR
public static final int SQLDRV_NOT_AVAILABLE
public static final int SQLIP_SUCCESS
public static final int SQLIP_FAILURE
public static final int SQLIP_ERROR
public static final int SQLIP_EOS
public static final int UL_TM_FATAL
public static final int UL_TM_SNO
public static final int UL_TM_PARM
public static final int UL_TM_ERRORS
public static final int UL_TM_MAJOR_EV
public static final int UL_TM_MINOR_EV
public static final int UL_TM_INFO
public static final int UL_TM_F_TRACE
public static final int UL_TM_TRIVIA
public static final int XO_TYPE_CHAR
public static final int XO_TYPE_NUMERIC
public static final int XO_TYPE_DECIMAL
public static final int XO_TYPE_INTEGER
public static final int XO_TYPE_SMALL
public static final int XO_TYPE_SMALLINT
public static final int XO_TYPE_FLOAT
public static final int XO_TYPE_REAL
public static final int XO_TYPE_DOUBLE
public static final int XO_TYPE_DATE
public static final int XO_TYPE_TIME
public static final int XO_TYPE_TIMESTAMP
public static final int XO_TYPE_VARCHAR
public static final int XO_TYPE_VARIANT
public static final int XO_TYPE_LONGVARCHAR
public static final int XO_TYPE_VARBINARY
public static final int XO_TYPE_BINARY
public static final int XO_TYPE_LONGVARBINARY
public static final int XO_TYPE_BIGINT
public static final int XO_TYPE_TINYINT
public static final int XO_TYPE_BIT
public static final int XO_TYPE_DEFAULT
public static final int XO_NULL_DATA
public static final int XO_NTS
public static final int NULL_INDICATOR
public static final int NOT_NULL_INDICATOR
public static final int SQLDRV_NTS
public static final int XO_NO_NULLS
public static final int XO_NULLABLE
public static final int XO_NULLABLE_UNKNOWN
public static final int SQLDRV_INFO_NEXT_RESULT_SET_AVAILABLE
public static final int SQLDRV_INFO_OUTPUT_RESULT_SET_AVAILABLE
public static final int SQLIP_COL_ATTRIB_HIDDEN
public static final int SQLIP_COL_ATTRIB_KEY
public static final int XO_TM_SECOND
public static final int XO_TM_MINUTE
public static final int XO_TM_HOUR
public static final int XO_TM_DAY_OF_MONTH
public static final int XO_TM_MONTH
public static final int XO_TM_YEAR
public static final int XO_TM_DAY_OF_WEEK
public static final int XO_TM_DAY_OF_YEAR
public static final int XO_TM_IS_DST
public static final int XO_TM_FRACTION
public static final int SQL_ALL_TYPES
public static final int SQL_SCOPE_CURROW
public static final int SQL_SCOPE_TRANSACTION
public static final int SQL_SCOPE_SESSION
| Method Detail |
public int sqlipCloseCursor()
public int sqlipCloseStmt()
public int sqlipDeclareCursor(java.lang.String psCursorName)
cursorName - Cursor name
public int sqlipError(java.lang.StringBuffer sSqlState,
xo_int piNativeError,
java.lang.StringBuffer sErrorText)
sSqlState - Return a 5 character SQL sate string if the sSqlState is not NULL.piNativeError - Return an integer value indicating a native error.
This code will be made available to the client application.
Provide this if piNativeError in not NULL.sErrorText - Return error message of length SQLDRV_MAX_MESSAGE_LENGTH or
less if sErrorText is not NULL.public int sqlipFetchRow()
public int sqlipGetColspec(int iColNum,
xo_int piXODataType,
xo_int pbNullable,
java.lang.StringBuffer pColName,
xo_int piLen,
xo_int piPrecision,
xo_int piScale,
xo_col_attribute pColAttributes,
xo_int iFlags)
iColNum - Column number - first column starts at zero.piXODataType - Data type of the column. This information describes how the value of this column will
be returned when get_colval is called.pbNullable - Whether the column can have null values or not
pColName - Allocate a buffer, fill it with the column name and return the pointer to this buffer.
This buffer is used by the calling function.piLen - Maximum length of the data in this column. Leave null for other types.
piPrecision - Number of digits of mantissa precision.
piScale - Total # of significant digits to the right of the decimal point.
Only required for NUMERIC typespColAttributes - Object into which additional column attributes can be returned.
Leave as is if you don't want to return any additional information for each column.
Only the OLE DB client currently uses this information.
A column is uniquely identified by [sCatalogName].[sSchemaName].[sBaseTableName].[sBaseColumnName].iFlags - Column flag formed by logical OR of one or more of the following:
public java.lang.Object sqlipGetColval(int iColNum,
xo_int piXODataType,
xo_int piIndicator,
xo_int piStatus)
iColNum - Column number - first column starts at zero.piXODataType - Data type of the column. This information describes how the
value is stored at the pointer returned in ppVal.piIndicator - Whether the column value is null or not.
piStatus -
public int sqlipGetInfo(int iInfoType,
java.lang.StringBuffer sInfoValue)
iInfoType - sInfoValue - Buffer to return the data into.public int sqlipGetNumcols(xo_int piNumCols)
For prepared statements, this function is called immediately after a call to sqlipPrepareStmt. If at this time your backend is not capable of determining the result specification then it should return 0 for the number of columns. This function is also called immediately after a call to sqlipOpenCursor and sqlipOpenNextCursor. At this time it must return a non-zero value for the number of columns if any rows are to be fetched.
piNumCols - Number of columns if at this point you can determine the result set.
Return 0 otherwise.public int sqlipGetNumparams(xo_int piNumParams)
piNumParams - Number of parameters. A valid value is required otherwise the OpenAccess
layer will report a mismatch in the number of parameter values passed in
and the number of parameters in the query reported by this method.
public int sqlipInitParam(int iParam,
int iIndicator,
java.lang.String sValAsStr,
int iXODataType)
iParam - Parame ter number - first parameter starts at zero.iIndicator - Indicates whether the value is null terminated or is a valid NULL terinated string:
sValAsStr - Parameter value as a string.iXODataType - Data type of the parameter as specified by the client application.
Use this information to determine how to interpret the value passed in as a string so
that it can be passed to the backend database accordingly. In many cases you can just
pass it in as a string as the backend will handle all conversions.public int sqlipIsCursorOpen(xo_int piCursorOpen)
piCursorOpen - 1 means cursor is open and 0 means closed.public int sqlipOpenCursor(xo_int piNumResRows)
For statements that result in a cursor the IP should execute the statement and open the cursor to the first row. Return the number of rows selected in the piNumResRows parameter. If the number of rows selected cannot be determined at this time then return -1. A close_cursor will be called when all rows have been fetched or when the application closes the statement.
For statements that update the data (INSERT, UPDATE, DELETE, etc), the IP should execute the statement and return in the piNumResRows the number of rows affected and return 0 for the number of columns in the cursor when sqlipGetNumcols is called. A sqlipCloseCursor is not called when no columns are returned.
piNumResRows - Number of rows in the cursor or the number of rows affected for data modifying query.
If the statement results in a cursor and the number of rows in the cursor
cannot be determined then return -1.public int sqlipOpenNextCursor(xo_int piNumResRows)
piNumResRows - Number of rows in the cursor or the number of rows affected for data modifying query.
If the statement results in a cursor and the number of rows in the cursor
cannot be determined then return -1.public int sqlipOpenOutputCursor(xo_int piNumResRows)
piNumResRows - Number or rows in this cursor. Should be one or zero.public int sqlipPrepareStmt(java.lang.String sSqlStmt)
sSqlStmt - SQL string to prepare.public int sqlipSetInfo(java.lang.String pCmdArgs)
pCmdArgs - The options string contains settings for maximum number of rows, query
timeout, and extended column attributes. These settings are passed in using
keywords mrows, qt, and op.
An example options string is: 'mrows=0;qt=0;op=0'
public int sqlipGetParamSpec(int iParmNum,
xo_int iXoDataType,
xo_int piNullable,
xo_int piLen,
xo_int piPrecision,
xo_int piScale,
xo_int piDirection,
xo_int piFlags)
iParmNum - Parameter number - first parameter starts at one.iXoDataType - Data type of the parameter.piNullable - Whether the column can have null values or not.
piLen - Maximum length of the data in this column. Leave null for other types.
This value cannot be larger then 0x7fffffff
piPrecision - Number of digits of mantissa precision.
piScale - Total # of significant digits to the right of the decimal point.
Only required for NUMERIC typespiDirection - Direction of the parameter.
piFlags - Not usedpublic int sqlipMapToXoType(int iJavaType)
The methods sqlipGetColspec, sqlipGetParamSpec, and sqlipGetColval must always return the data type (passed back in iXODataType object) using the OpenAccess data type codes.
iJavaType - Database specific data type code
public int sqlipTables(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String types)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.types - Table types name uses to narrow down the search. Table types are separated by comma.
null indicates ignore it for search.
public int sqlipColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.column - Column name uses to narrow down the search. null indicates ignore it for search.
public int sqlipPrimaryKeys(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.public int sqlipCatalogs()
public int sqlipSchemas()
public int sqlipTableTypes()
public int sqlipIndexInfo(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
boolean unique,
boolean approximate)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.unique - approximate -
public int sqlipProcedures(java.lang.String catalog,
java.lang.String schema,
java.lang.String procedure)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.procedure - Procedure name uses to narrow down the search. null indicates ignore it for search.
public int sqlipProcedureColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String procedure,
java.lang.String column)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.procedure - Procedure name uses to narrow down the search. null indicates ignore it for search.column - Procedure column name uses to narrow down the search. null indicates ignore it for search.
public int sqlipBestRowIdentifier(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
int scope,
boolean nullable)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.scope - Indicates scope of interest. Value will be one of
nullable -
public int sqlipVersionColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
catalog - Catalog name uses to narrow down the search. null indicates ignore it for search.schema - Schema name uses to narrow down the search. null indicates ignore it for search.table - Table name uses to narrow down the search. null indicates ignore it for search.
public int sqlipForeignKeys(java.lang.String primaryCatalog,
java.lang.String primarySchema,
java.lang.String primaryTable,
java.lang.String foreignCatalog,
java.lang.String foreignSchema,
java.lang.String foreignTable)
primaryCatalog - Primary key catalog name uses to narrow down the search. null indicates ignore it for search.primarySchema - Primary key schema name uses to narrow down the search. null indicates ignore it for search.primaryTable - Primary key table name uses to narrow down the search. null indicates ignore it for search.foreignCatalog - Foreign key catalog name uses to narrow down the search. null indicates ignore it for search.foreignSchema - Foreign key schema name uses to narrow down the search. null indicates ignore it for search.foreignTable - Foreign key table name uses to narrow down the search. null indicates ignore it for search.public int sqlipTypeInfo(int type)
type - Type uses to narrow down the search. SQL_ALL_TYPES indicates ignore it for search.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||