The ResultSet->GetSchema method allows you to retrieve schema information about a result set, such as: column names, total number of columns, column scales, column sizes, and column SQL types.
The following example demonstrates how to use the ResultSet.GetSchema method to display schema information in a command prompt.
ResultSetSchema * rss = rs->GetSchema();
ULValue val;
char name[ MAX_NAME_LEN ];
for( int i = 1;
i <= rss->GetColumnCount();
i++ ){
val = rss->GetColumnName( i );
val.GetString( name, MAX_NAME_LEN );
printf( "id= %d, name= %s \n", i, name );
} |
See GetSchema function.
| Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |