GetColumnMetaData

PowerBuilder Native Interface

IPB_ResultSetAccessor interface:

GetColumnMetaData method

Description

Syntax

GetColumnMetaData (unsigned long columnNum, LPTSTR columnName, pbvalue_type* type, unsigned long* width )

Return Values

Examples

CRsltSet::CRsltSet(IPB_ResultSetAccessor* rsAccessor)
   :m_lRefCount (0), d_rsAccessor(rsAccessor)
{
   rsAccessor->AddRef();
      // for each column
   ULONG nNumColumns = d_rsAccessor->GetColumnCount();
   d_arrColTypes = new USHORT[nNumColumns + 1];
   for (ULONG nColumn=1; nColumn <= nNumColumns;
      ++nColumn)
      {
         // get the column type into the array
         pbvalue_type type;
         d_rsAccessor->GetColumnMetaData (nColumn,
            NULL, &type, NULL);
         d_arrColTypes[nColumn] = (USHORT)type;
      }
}

See Also