IPB_ResultSetAccessor interface:
GetColumnMetaData method
Description
Obtains a column’s metadata. The column number of
the first column is 1. Memory must be allocated for columnName before
this function call. The pointer values can be null.
Syntax
|
1 |
GetColumnMetaData (unsigned long <span>columnNum</span>, LPTSTR <span>columnName</span>, pbvalue_type* <span>type</span>, unsigned long* <span>width</span> ) |
|
Argument |
Description |
|---|---|
|
columnNum |
The number of the column for which you |
|
columnName |
The name of the specified column |
|
type |
A pointer to the type of the specified |
|
width |
A pointer to the width of the specified |
Return Values
None.
Examples
This example gets the number of columns in a result
set and allocates an array to hold the types of each column:
|
1 |
CRsltSet::CRsltSet(IPB_ResultSetAccessor* rsAccessor)<br>   :m_lRefCount (0), d_rsAccessor(rsAccessor)<br>{<br>   rsAccessor->AddRef();<br>      // for each column<br>   ULONG nNumColumns = d_rsAccessor->GetColumnCount();<br>   d_arrColTypes = new USHORT[nNumColumns + 1];<br>   for (ULONG nColumn=1; nColumn <= nNumColumns;<br>      ++nColumn)<br>      {<br>         // get the column type into the array<br>         pbvalue_type type;<br>         d_rsAccessor->GetColumnMetaData (nColumn,<br>            NULL, &type, NULL);<br>         d_arrColTypes[nColumn] = (USHORT)type;<br>      }<br>} |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest