SQLDBC::SQLDBC_ParameterMetaData Class Reference

List of all members.


Detailed Description

Can retrieve information to find out the parameter types and their properties in a PreparedStatement object.

Definition at line 415 of file SQLDBC.h.

Public Types

Public Member Functions


Member Typedef Documentation

typedef enum SQLDBC::SQLDBC_ParameterMetaData::ParameterNullBehavior SQLDBC::SQLDBC_ParameterMetaData::ParameterNullBehavior

typedef enum SQLDBC::SQLDBC_ParameterMetaData::ParameterMode SQLDBC::SQLDBC_ParameterMetaData::ParameterMode


Member Enumeration Documentation

enum SQLDBC::SQLDBC_ParameterMetaData::ParameterNullBehavior

Enumerator:
parameterNoNulls  The parameter must not be NULL values.
parameterNullable  The parameter allows NULL values.
parameterNullableUnknown  It is unknown whether the parameter allows NULL values.

Definition at line 420 of file SQLDBC.h.

enum SQLDBC::SQLDBC_ParameterMetaData::ParameterMode

Enumerator:
parameterModeUnknown  The input/output behaviour of the parameter is unknown.
parameterModeIn  The parameter in an input parameter.
parameterModeInOut  The parameter in an input and output parameter.
parameterModeOut  The parameter in an output parameter.

Definition at line 444 of file SQLDBC.h.


Member Function Documentation

SQLDBC_Int2 SQLDBC::SQLDBC_ParameterMetaData::getParameterCount (  ) 

Returns the number of parameter/columns in the PreparedStatement or ResultSet object.

Returns:
The number of parameter or columns.

SQLDBC_Retcode SQLDBC::SQLDBC_ParameterMetaData::getParameterName ( SQLDBC_Int2  param,
char *  buffer,
const SQLDBC_StringEncoding  encoding,
const SQLDBC_Length  bufferSize,
SQLDBC_Length bufferLength 
) const

Requests the name of the specified parameter.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
buffer The buffer to store the name
encoding The code of the name of the specified parameter
bufferSize The buffer size in bytes of the buffer.
bufferLength [out] The number of bytes stored in the buffer, not included the number of bytes necessary for the zero-terminator. If the source string exceeds the bufferSize value SQLDBC_DATA_TRUNC is returned and the bufferLength is set to the number of bytes required to store the name without truncation (not included the number of bytes necessary for the zero-terminator).
Returns:
SQLDBC_OK on success, SQLDBC_DATA_TRUNC if the buffer is too small.

SQLDBC_SQLType SQLDBC::SQLDBC_ParameterMetaData::getParameterType ( SQLDBC_Int2  param  ) 

Returns the data type of the specified parameter.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Data type of the parameter

ParameterMode SQLDBC::SQLDBC_ParameterMetaData::getParameterMode ( SQLDBC_Int2  param  ) 

Returns the input/output behaviour of the specified parameter.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The input/output behaviour of the parameter data type; Possible values are: parameterModeIn, parameterModeOut or parameterModeInOut.

SQLDBC_Int4 SQLDBC::SQLDBC_ParameterMetaData::getParameterLength ( SQLDBC_Int2  param  ) 

Returns the maximum width in characters of the data type of the specified parameter.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The maximum width in bytes of the data type of the specified parameter

SQLDBC_Int4 SQLDBC::SQLDBC_ParameterMetaData::getPrecision ( SQLDBC_Int2  param  ) 

Returns the number of decimal digits of the data type of the specified parameter.

For number types, getPrecision() returns the number of decimal digits. For character types, it returns the maximum length in characters. For binary types, it returns the maximum length in bytes.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
The number of decimal digits of the data type of the specified parameter.

SQLDBC_Int4 SQLDBC::SQLDBC_ParameterMetaData::getScale ( SQLDBC_Int2  param  ) 

Returns the number of decimal places of the data type of the specified parameter.

For none numeric types, the scale is set to zero.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Number of decimal places of the data type of the specified parameter.

SQLDBC_Int4 SQLDBC::SQLDBC_ParameterMetaData::getPhysicalLength ( SQLDBC_Int2  param  ) 

Returns maximum physical width in bytes of the data type of the specified parameter.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Maximum physical width in bytes of the data type of the specified parameter.

ParameterNullBehavior SQLDBC::SQLDBC_ParameterMetaData::isNullable ( SQLDBC_Int2  param  ) 

Returns whether NULL values are allowed for the specified parameter values.

Parameters:
param Index of the parameter. The first parameter is number 1, the second is number 2, ...
Returns:
Whether NULL values are allowed for the specified parameter; Possible values are parameterNoNulls, parameterNullable or parameterNullableUnknown