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.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |