Proud::COdbcByteData Class Reference

Public Member Functions

 COdbcByteData (SQLCHAR *pData, SQLLEN dataLength, SQLULEN maxLength)
 
SQLCHAR * GetDataPtr ()
 
SQLLEN GetDataLength ()
 
void SetDataLength (SQLLEN dataLength)
 
SQLULEN GetMaxLength ()
 

Detailed Description

It is used for input & output of binary data at ODBC API. If the size of binary data is too big, this class will be used to omit unnecessary copy process in the process of data input & output. A user must possess binary data and this class refers to the data.

Constructor & Destructor Documentation

Proud::COdbcByteData::COdbcByteData ( SQLCHAR *  pData,
SQLLEN  dataLength,
SQLULEN  maxLength 
)

Constructor function. Please input the size & address of binary data that a user has.

Parameters
pDataAddress of binary data.
dataLengthCurrent valid size of binary data.
maxLengthMaximum size of binary data saving.

Member Function Documentation

SQLLEN Proud::COdbcByteData::GetDataLength ( )

Get the data size that has been set.

SQLCHAR* Proud::COdbcByteData::GetDataPtr ( )

Get the data address that has been set.

SQLULEN Proud::COdbcByteData::GetMaxLength ( )

Obtain the maximum size of data.

void Proud::COdbcByteData::SetDataLength ( SQLLEN  dataLength)

Readjust the size of data. If the length of data buffer changes when modifying data buffer that has been set by a constructor, you will be required to change the size by calling this function.