Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » UltraLite - C and C++ Programming » Application Development » Developing applications using the UltraLite C++ API » Accessing data using SQL


Result set schema description

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.