src/odbc/odbcStmt.cxx File Reference

#include "odbcCommon.h"

Include dependency graph for odbcStmt.cxx:

Go to the source code of this file.

Functions

SQLRETURN SQLAllocStmt (SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandle)
SQLRETURN SQLFreeStmt (SQLHSTMT StatementHandle, SQLUSMALLINT Option)
SQLRETURN SQLBindCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
SQLRETURN SQLSetParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER *StrLen_or_Ind)
SQLRETURN SQLBindParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER *StrLen_or_Ind)
SQLRETURN SQLBindParameter (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
SQLRETURN SQLPrepare (SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
SQLRETURN SQLExecute (SQLHSTMT StatementHandle)
SQLRETURN SQLExecDirect (SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
SQLRETURN SQLSetStmtOption (SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
SQLRETURN SQL_API SQLSetStmtAttr (SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
SQLRETURN SQLFetch (SQLHSTMT StatementHandle)
SQLRETURN SQLCloseCursor (SQLHSTMT StatementHandle)
SQLRETURN SQLSetCursorName (SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength)
SQLRETURN SQLGetCursorName (SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength)
SQLRETURN SQLNumResultCols (SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
SQLRETURN SQL_API SQLRowCount (SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
SQLRETURN SQLDescribeCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
SQLRETURN SQLColAttributes (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLINTEGER *NumericAttributePtr)
SQLRETURN SQLColAttribute (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLPOINTER NumericAttributePtr)
SQLRETURN SQLNumParams (SQLHSTMT StatementHandle, SQLSMALLINT *ParameterCountPtr)
SQLRETURN SQLDescribeParam (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT *DataTypePtr, SQLUINTEGER *ParameterSizePtr, SQLSMALLINT *DecimalDigitsPtr, SQLSMALLINT *NullablePtr)


Function Documentation

SQLRETURN SQLAllocStmt ( SQLHDBC  ConnectionHandle,
SQLHSTMT StatementHandle 
)

Definition at line 26 of file odbcStmt.cxx.

References CSqlOdbcStmt::SQLAllocHandle().

00029 {
00030     return( CSqlOdbcStmt::SQLAllocHandle( ConnectionHandle, StatementHandle ) );
00031 }

Here is the call graph for this function:

SQLRETURN SQLBindCol ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLSMALLINT  TargetType,
SQLPOINTER  TargetValue,
SQLINTEGER  BufferLength,
SQLINTEGER StrLen_or_Ind 
)

Definition at line 184 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLBindCol().

00191 {
00192     // Is Stmt valid ?
00193     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00194         return( SQL_INVALID_HANDLE );
00195 
00196     return( ((CSqlOdbcStmt*) StatementHandle)->SQLBindCol( ColumnNumber,
00197         TargetType, TargetValue, BufferLength, StrLen_or_Ind ) );
00198 }

Here is the call graph for this function:

SQLRETURN SQLBindParam ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT  ValueType,
SQLSMALLINT  ParameterType,
SQLUINTEGER  LengthPrecision,
SQLSMALLINT  ParameterScale,
SQLPOINTER  ParameterValue,
SQLINTEGER StrLen_or_Ind 
)

Definition at line 317 of file odbcStmt.cxx.

References SQL_PARAM_INPUT_OUTPUT, and SQLBindParameter().

00326 {
00327     return( SQLBindParameter( StatementHandle, ParameterNumber,
00328         SQL_PARAM_INPUT_OUTPUT, ValueType, ParameterType, LengthPrecision,
00329         ParameterScale, ParameterValue, 0, StrLen_or_Ind) );
00330 }

Here is the call graph for this function:

SQLRETURN SQLBindParameter ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT  InputOutputType,
SQLSMALLINT  ValueType,
SQLSMALLINT  ParameterType,
SQLUINTEGER  LengthPrecision,
SQLSMALLINT  ParameterScale,
SQLPOINTER  ParameterValue,
SQLINTEGER  BufferLength,
SQLINTEGER StrLen_or_Ind 
)

Definition at line 332 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLBindParameter().

00343 {
00344     // Is Stmt valid ?
00345     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00346         return( SQL_INVALID_HANDLE );
00347 
00348     return( ((CSqlOdbcStmt*) StatementHandle)->SQLBindParameter( ParameterNumber,
00349         InputOutputType, ValueType,
00350         ParameterType, LengthPrecision,
00351         ParameterScale, ParameterValue,
00352         BufferLength, StrLen_or_Ind ) );
00353 }

Here is the call graph for this function:

SQLRETURN SQLCloseCursor ( SQLHSTMT  StatementHandle  ) 

Definition at line 878 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLCloseCursor().

Referenced by SqlOdbcStatement::close(), CacheTableLoader::load(), and SQLCloseCursor().

00879 {
00880     // Is Stmt valid ?
00881     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00882         return( SQL_INVALID_HANDLE );
00883 
00884     return( ((CSqlOdbcStmt*) StatementHandle)->SQLCloseCursor() );
00885 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLColAttribute ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLUSMALLINT  FieldIdentifier,
SQLPOINTER  CharacterAttributePtr,
SQLSMALLINT  BufferLength,
SQLSMALLINT StringLengthPtr,
SQLPOINTER  NumericAttributePtr 
)

Definition at line 1196 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLColAttribute().

01204 {
01205     // Is Stmt valid ?
01206     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01207         return( SQL_INVALID_HANDLE );
01208 
01209     return( ((CSqlOdbcStmt*) StatementHandle)->SQLColAttribute(ColumnNumber ,FieldIdentifier , 
01210             CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr) );
01211 }

Here is the call graph for this function:

SQLRETURN SQLColAttributes ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLUSMALLINT  FieldIdentifier,
SQLPOINTER  CharacterAttributePtr,
SQLSMALLINT  BufferLength,
SQLSMALLINT StringLengthPtr,
SQLINTEGER NumericAttributePtr 
)

Definition at line 1179 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLColAttribute().

01187 {
01188     // Is Stmt valid ?
01189     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01190         return( SQL_INVALID_HANDLE );
01191 
01192     return( ((CSqlOdbcStmt*) StatementHandle)->SQLColAttribute(ColumnNumber ,FieldIdentifier , 
01193             CharacterAttributePtr, BufferLength, StringLengthPtr, (SQLPOINTER)NumericAttributePtr) );
01194 }

Here is the call graph for this function:

SQLRETURN SQLDescribeCol ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ColumnNumber,
SQLCHAR ColumnName,
SQLSMALLINT  BufferLength,
SQLSMALLINT NameLength,
SQLSMALLINT DataType,
SQLUINTEGER ColumnSize,
SQLSMALLINT DecimalDigits,
SQLSMALLINT Nullable 
)

Definition at line 1089 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLDescribeCol().

01099 {
01100     // Is Stmt valid ?
01101     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01102         return( SQL_INVALID_HANDLE );
01103 
01104     return( ((CSqlOdbcStmt*) StatementHandle)->SQLDescribeCol( ColumnNumber, ColumnName, BufferLength, 
01105             NameLength, DataType, ColumnSize, DecimalDigits, Nullable) );
01106 }

Here is the call graph for this function:

SQLRETURN SQLDescribeParam ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT DataTypePtr,
SQLUINTEGER ParameterSizePtr,
SQLSMALLINT DecimalDigitsPtr,
SQLSMALLINT NullablePtr 
)

Definition at line 1392 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLDescribeParam().

01399 {
01400     // Is Stmt valid ?
01401     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01402         return( SQL_INVALID_HANDLE );
01403 
01404     return( ((CSqlOdbcStmt*) StatementHandle)->SQLDescribeParam(ParameterNumber,DataTypePtr,
01405                 ParameterSizePtr,DecimalDigitsPtr,NullablePtr ) );
01406 }

Here is the call graph for this function:

SQLRETURN SQLExecDirect ( SQLHSTMT  StatementHandle,
SQLCHAR StatementText,
SQLINTEGER  TextLength 
)

Definition at line 687 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLExecDirect().

Referenced by SQLExecDirect().

00691 {
00692     // Is Stmt valid ?
00693     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00694         return( SQL_INVALID_HANDLE );
00695 
00696     return( ((CSqlOdbcStmt*) StatementHandle)->SQLExecDirect( StatementText, TextLength ) );
00697 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLExecute ( SQLHSTMT  StatementHandle  ) 

Definition at line 540 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLExecute().

Referenced by SqlOdbcStatement::execute(), CacheTableLoader::load(), and SQLExecute().

00541 {
00542     // Is Stmt valid ?
00543     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00544         return( SQL_INVALID_HANDLE );
00545 
00546     return( ((CSqlOdbcStmt*) StatementHandle)->SQLExecute() );
00547 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLFetch ( SQLHSTMT  StatementHandle  ) 

Definition at line 767 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLFetch().

Referenced by SqlOdbcStatement::fetch(), SqlOdbcStatement::fetchAndPrint(), SqlOdbcStatement::getPrimaryKeyFieldName(), CacheTableLoader::load(), and SQLFetch().

00768 {
00769     // Is Stmt valid ?
00770     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00771         return( SQL_INVALID_HANDLE );
00772 
00773     return( ((CSqlOdbcStmt*) StatementHandle)->SQLFetch() );
00774 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLFreeStmt ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  Option 
)

Definition at line 111 of file odbcStmt.cxx.

References isValidHandle(), SQL_DROP, SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, CSqlOdbcStmt::SQLFreeHandle(), and SQLFreeStmt().

Referenced by SQLFreeStmt().

00114 {
00115     // Is Stmt valid ?
00116     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00117         return( SQL_INVALID_HANDLE );
00118 
00119     // Free Handle
00120     if( Option == SQL_DROP )
00121         return( CSqlOdbcStmt::SQLFreeHandle( StatementHandle ) );
00122 
00123     return( ((CSqlOdbcStmt*) StatementHandle)->SQLFreeStmt( Option ) );
00124 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLGetCursorName ( SQLHSTMT  StatementHandle,
SQLCHAR CursorName,
SQLSMALLINT  BufferLength,
SQLSMALLINT NameLength 
)

Definition at line 962 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLGetCursorName().

Referenced by SQLGetCursorName().

00967 {
00968     // Is Stmt valid ?
00969     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00970         return( SQL_INVALID_HANDLE );
00971 
00972     return( ((CSqlOdbcStmt*) StatementHandle)->SQLGetCursorName( CursorName, BufferLength, NameLength ) );
00973 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLNumParams ( SQLHSTMT  StatementHandle,
SQLSMALLINT ParameterCountPtr 
)

Definition at line 1365 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLNumParams().

Referenced by SqlOdbcStatement::prepare(), and SQLNumParams().

01368 {
01369     // Is Stmt valid ?
01370     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01371         return( SQL_INVALID_HANDLE );
01372 
01373     return( ((CSqlOdbcStmt*) StatementHandle)->SQLNumParams(ParameterCountPtr) );
01374 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLNumResultCols ( SQLHSTMT  StatementHandle,
SQLSMALLINT ColumnCount 
)

Definition at line 1005 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLNumResultCols().

Referenced by CacheTableLoader::load(), SqlOdbcStatement::prepare(), and SQLNumResultCols().

01008 {
01009     // Is Stmt valid ?
01010     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01011         return( SQL_INVALID_HANDLE );
01012 
01013     return( ((CSqlOdbcStmt*) StatementHandle)->SQLNumResultCols( ColumnCount ) );
01014 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLPrepare ( SQLHSTMT  StatementHandle,
SQLCHAR StatementText,
SQLINTEGER  TextLength 
)

Definition at line 457 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLPrepare().

Referenced by CacheTableLoader::load(), SqlOdbcStatement::prepare(), and SQLPrepare().

00461 {
00462     // Is Stmt valid ?
00463     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00464         return( SQL_INVALID_HANDLE );
00465 
00466     // Prepare
00467     return( ((CSqlOdbcStmt*) StatementHandle)->SQLPrepare( StatementText, TextLength ) );
00468 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQL_API SQLRowCount ( SQLHSTMT  StatementHandle,
SQLINTEGER RowCount 
)

Definition at line 1044 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLRowCount().

01047 {
01048     // Is Stmt valid ?
01049     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
01050         return( SQL_INVALID_HANDLE );
01051 
01052     return( ((CSqlOdbcStmt*) StatementHandle)->SQLRowCount( RowCount ) );
01053 }

Here is the call graph for this function:

SQLRETURN SQLSetCursorName ( SQLHSTMT  StatementHandle,
SQLCHAR CursorName,
SQLSMALLINT  NameLength 
)

Definition at line 902 of file odbcStmt.cxx.

References isValidHandle(), SQL_HANDLE_STMT, SQL_INVALID_HANDLE, SQL_SUCCESS, and SQLSetCursorName().

Referenced by SQLSetCursorName().

00906 {
00907     // Is Stmt valid ?
00908     if( isValidHandle( (CSqlOdbcStmt*) StatementHandle, SQL_HANDLE_STMT ) != SQL_SUCCESS )
00909         return( SQL_INVALID_HANDLE );
00910 
00911     return( ((CSqlOdbcStmt*) StatementHandle)->SQLSetCursorName( CursorName, NameLength ) );
00912 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLSetParam ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  ParameterNumber,
SQLSMALLINT  ValueType,
SQLSMALLINT  ParameterType,
SQLUINTEGER  LengthPrecision,
SQLSMALLINT  ParameterScale,
SQLPOINTER  ParameterValue,
SQLINTEGER StrLen_or_Ind 
)

Definition at line 302 of file odbcStmt.cxx.

References SQL_PARAM_INPUT_OUTPUT, and SQLBindParameter().

00311 {
00312     return( SQLBindParameter( StatementHandle, ParameterNumber,
00313         SQL_PARAM_INPUT_OUTPUT, ValueType, ParameterType, LengthPrecision,
00314         ParameterScale, ParameterValue, 0, StrLen_or_Ind) );
00315 }

Here is the call graph for this function:

SQLRETURN SQL_API SQLSetStmtAttr ( SQLHSTMT  StatementHandle,
SQLINTEGER  Attribute,
SQLPOINTER  Value,
SQLINTEGER  StringLength 
)

Definition at line 730 of file odbcStmt.cxx.

References SQLSetStmtAttr().

Referenced by SQLSetStmtAttr(), and SQLSetStmtOption().

00733 {
00734     return (((CSqlOdbcStmt*)StatementHandle)->SQLSetStmtAttr(Attribute, Value,StringLength));
00735 }

Here is the call graph for this function:

Here is the caller graph for this function:

SQLRETURN SQLSetStmtOption ( SQLHSTMT  StatementHandle,
SQLUSMALLINT  Option,
SQLUINTEGER  Value 
)

Definition at line 722 of file odbcStmt.cxx.

References SQLSetStmtAttr().

00726 {
00727     return  (SQLSetStmtAttr(StatementHandle, Option, (SQLPOINTER) Value, 0));
00728 }

Here is the call graph for this function:


Generated on Mon Jun 9 22:41:25 2008 for csql by  doxygen 1.4.7