|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CParamDescr { public: enum { sqlBigint, sqlBinary, sqlBit, sqlChar, sqlDate, sqlDecimal, sqlDouble, sqlFloat, sqlInteger, sqlLongvarbinary, sqlLongvarchar, sqlNumeric, sqlReal, sqlSmallint, sqlTime, sqlTimestamp, sqlTinyint, sqlVarbinary, sqlVarchar }; public: CParamDescr(); ~CParamDescr(); public: void RemoveAll(); void AddParam(int nType, int nPrecision, int nScale); int GetParamCount() const; int GetType(int nIndex) const; int GetPrecision(int nIndex) const; int GetScale(int nIndex) const; };
The list of parameter descriptions.
Instances of this class are used to describe parameters required by parametrized SQL statements. Each list is an ordered sequence of parameter descriptions. Each parameter description provides specification for SQL data type, precision and scale.
SQL data types are represented as integer codes. Allowed values are specified by the anonymous enumeration contained in this class declaration.
The precision of a numeric parameter is the maximum number of digits used by the data type of the parameter. The precision of a non-numeric parameter is the maximum length of the parameter.
The scale of the fixed numeric parameter is the maximum number
of digits to the right side of the decimal point.
The parameter is considered to be a fixed point numeric,
if it has the numeric type other than
typeReal
,
typeFloat
, or
typeDouble
.
The scale is not applicable to parameters which are not
fixed numeric; in such cases the scale must be set to
0
.
Constructor/Destructor Summary | |
CParamDescr
();
����������Constructs the parameter description list. |
|
~CParamDescr
();
����������Destroys the parameter description list. |
Function Summary | |
void
|
RemoveAll
();
����������Clears this parameter description list, removing all descriptions. |
void
|
AddParam
(int nType, int nPrecision, int nScale);
����������Adds a parameter description to the end of this list. |
int
|
GetParamCount
() const;
����������Returns the number of parameter descriptions in this list. |
int
|
GetType
(int nIndex) const;
����������Returns the type assigned to the parameter description at the specified index. |
int
|
GetPrecision
(int nIndex) const;
����������Returns the precision assigned to the parameter description at the specified index. |
int
|
GetScale
(int nIndex) const;
����������Returns the scale assigned to the parameter description at the specified index. |
Constructor/Destructor Detail |
CParamDescr();
Constructs the parameter description list.
~CParamDescr();
Destroys the parameter description list.
Function Detail |
void RemoveAll();
Clears this parameter description list, removing all descriptions.
void AddParam(int nType, int nPrecision, int nScale);
Adds a parameter description to the end of this list.
nType
- the type of the parameternPrecision
- the precision of the parameternScale
- the scale of the parameterint GetParamCount() const;
Returns the number of parameter descriptions in this list.
int GetType(int nIndex) const;
Returns the type assigned to the parameter description at the specified index.
nIndex
- the index (zero-based)int GetPrecision(int nIndex) const;
Returns the precision assigned to the parameter description at the specified index.
nIndex
- the index (zero-based)int GetScale(int nIndex) const;
Returns the scale assigned to the parameter description at the specified index.
nIndex
- the index (zero-based)
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |