Proud::COdbcRecordset Class Reference

Public Member Functions

PROUDSRV_API bool MoveFirst ()
 
PROUDSRV_API bool MoveLast ()
 
PROUDSRV_API bool MovePrev ()
 
PROUDSRV_API bool MoveNext ()
 
PROUDSRV_API bool NextRecordSet ()
 
PROUDSRV_API SQLLEN GetRowCount ()
 
PROUDSRV_API SQLLEN GetCurrentRowIndex ()
 
PROUDSRV_API SQLSMALLINT GetFieldCount ()
 
PROUDSRV_API bool IsBof ()
 
PROUDSRV_API bool IsEof ()
 
PROUDSRV_API String GetFieldName (int fieldIndex)
 
PROUDSRV_API OdbcSqlDataType GetFieldSqlType (int fieldIndex)
 
PROUDSRV_API OdbcSqlDataType GetFieldSqlType (const String &fieldName)
 
PROUDSRV_API SQLLEN GetFieldSizeOrNull (int fieldIndex)
 
PROUDSRV_API SQLLEN GetFieldSizeOrNull (const String &fieldName)
 
PROUDSRV_API SQLULEN GetFieldMaxSize (int fieldIndex)
 
SQLULEN GetFieldMaxSize (const String &fieldName)
 
PROUDSRV_API SQLSMALLINT GetFieldPrecision (int fieldIndex)
 
SQLSMALLINT GetFieldPrecision (const String &fieldName)
 
PROUDSRV_API bool GetFieldNullable (int fieldIndex)
 
bool GetFieldNullable (const String &fieldName)
 
PROUDSRV_API const COdbcVariantGetFieldValue (int fieldIndex)
 
PROUDSRV_API const COdbcVariantGetFieldValue (const String &fieldName)
 
PROUDSRV_API void SetEnvironment (COdbcConnection *conn, void *hstmt, const SQLLEN &rowcount)
 

Detailed Description

It is a class that can control Recordset that has been received by SELECT.

Member Function Documentation

PROUDSRV_API SQLLEN Proud::COdbcRecordset::GetCurrentRowIndex ( )

Return the current Row Index (ex> 0, 1, 2, ...). If Row Index is -1, its status is BOF and if it is same as Row Count, its status is EOF.

PROUDSRV_API SQLSMALLINT Proud::COdbcRecordset::GetFieldCount ( )

Return the total number of Fields.

PROUDSRV_API SQLULEN Proud::COdbcRecordset::GetFieldMaxSize ( int  fieldIndex)

Bring the maximum size (Database setting) of Field(Column) data.

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
SQLULEN Proud::COdbcRecordset::GetFieldMaxSize ( const String fieldName)

Bring the maximum size (Database setting) of Field(Column) data.

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API String Proud::COdbcRecordset::GetFieldName ( int  fieldIndex)

Get the name of Field(Column). It might not be executed normally at a query whose column name has not been defined, such as "SELECT COUNT(*) FROM TABLE". In this case, set Alias in the column name and use it like "SELECT COUNT(*) AS TOTAL FROM TABLE".

PROUDSRV_API bool Proud::COdbcRecordset::GetFieldNullable ( int  fieldIndex)

Return whether or not it can input NULL by Field(Column) data (Database setting).

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
bool Proud::COdbcRecordset::GetFieldNullable ( const String fieldName)

Return whether or not it can input NULL by Field(Column) data (Database setting).

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API SQLSMALLINT Proud::COdbcRecordset::GetFieldPrecision ( int  fieldIndex)

Bring a decimal place of Field(Column) data. It is used at types like Real, Float, Double and Timestamp.

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
SQLSMALLINT Proud::COdbcRecordset::GetFieldPrecision ( const String fieldName)

Bring a decimal place of Field(Column) data. It is used at types like Real, Float, Double and Timestamp.

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API SQLLEN Proud::COdbcRecordset::GetFieldSizeOrNull ( int  fieldIndex)

Bring the current size of Field(Column) data. In case of NULL, it returns -1.

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
PROUDSRV_API SQLLEN Proud::COdbcRecordset::GetFieldSizeOrNull ( const String fieldName)

Bring the current size of Field(Column) data. In case of NULL, it returns -1.

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API OdbcSqlDataType Proud::COdbcRecordset::GetFieldSqlType ( int  fieldIndex)

Get SqlDataType of Field(Column).

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
PROUDSRV_API OdbcSqlDataType Proud::COdbcRecordset::GetFieldSqlType ( const String fieldName)

Get SqlDataType of Field(Column).

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API const COdbcVariant& Proud::COdbcRecordset::GetFieldValue ( int  fieldIndex)

Return Field(Column) data. In case you do not know the type of data, use GetFieldSqlType() to get to know. Refer to OdbcEnum.h for Default OdbcDataType that is mapped with OdbcSqlDataType. ex> int a = recordset.GetFieldValue(1);

Parameters
fieldIndexField(Column) Index (ex> 1, 2, 3, ...)
PROUDSRV_API const COdbcVariant& Proud::COdbcRecordset::GetFieldValue ( const String fieldName)

Return Field(Column) data. In case you do not know the type of data, use GetFieldSqlType() to get to know. Refer to OdbcEnum.h for Default OdbcDataType that is mapped with OdbcSqlDataType. ex> int a = recordset.GetFieldValue("name");

Parameters
fieldnameIt is the name of Field(Column).
PROUDSRV_API SQLLEN Proud::COdbcRecordset::GetRowCount ( )

Return the total number of Row.

PROUDSRV_API bool Proud::COdbcRecordset::IsBof ( )

BOF indicates Index == -1 and it means there is no data that has been read.

PROUDSRV_API bool Proud::COdbcRecordset::IsEof ( )

EOF indicates Index == GetRowCount() and it means all data has been read.

PROUDSRV_API bool Proud::COdbcRecordset::MoveFirst ( )

Move to the first record. Return success/fail You cannot use it in the Recordset of the stored procedure.

PROUDSRV_API bool Proud::COdbcRecordset::MoveLast ( )

Move to the last record Return success/fail You cannot use it in the Recordset of the stored procedure.

PROUDSRV_API bool Proud::COdbcRecordset::MoveNext ( )

Move to the next record. Return success/fail You cannot use it in the Recordset of the stored procedure.

PROUDSRV_API bool Proud::COdbcRecordset::MovePrev ( )

Move to the previous record. Return success/fail You cannot use it in the Recordset of the stored procedure.

PROUDSRV_API bool Proud::COdbcRecordset::NextRecordSet ( )

When you bring many recordsets, you can change to the next recordset using this function. Return success/fail