ASA Programming Guide
Developing Applications with the .NET Data Provider
Accessing and manipulating data
Using the AsaDataAdapter object to access and manipulate data
When using the AsaDataAdapter, you can use the FillSchema method to obtain schema information about the result set in the DataSet. The FillSchema method returns the standard .NET DataTable object, which provides the names of all the columns in the result set.
For more information about the FillSchema method, see FillSchema method.
To obtain DataSet schema information using the FillSchema method
Declare and initialize an AsaConnection object.
AsaConnection conn = new AsaConnection( c_connStr );
Open the connection.
conn.Open();
Create an AsaDataAdapter with the SELECT statement you want to use. The schema is returned for the result set of this query.
AsaDataAdapter adapter = new AsaDataAdapter( "SELECT * FROM employee", conn );
Create a new DataTable object, in this case called Table, to fill with the schema.
DataTable dataTable = new DataTable( "Table" );
Fill the DataTable with the schema from the data source.
adapter.FillSchema( dataTable, SchemaType.Source );
Close the AsaConnection object.
conn.Close();
Bind the DataSet to the grid on the screen.
dataGrid.DataSource = dataTable;