A
Axel Dahmen
Hi,
I'm trying to retrieve the schema of some database tables from my database. In MSDN it says I need to call SqlDataAdapter.Fill() to retrieve the schema of a couple of tables at once. However, even though I've set the SqlDataAdapter.MissingSchemaAction to AddWithKey, the Fill() function retrieves not only the Schema but all the data as well.
How can I just retrieve the schema of some tables at once?
Any help is appreciated.
www.axeldahmen.de
Axel Dahmen
----
Here's the code I'm currently using:
{
SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM dbo.orgunit "
+ "SELECT * FROM dbo.employee "
+ "SELECT * FROM dbo.customer "
, ConnectionString);
DataSet schemaInfo = new DataSet();
adp.MissingSchemaAction = MissingSchemaAction.AddWithKey;
adp.Fill(schemaInfo);
}
I'm trying to retrieve the schema of some database tables from my database. In MSDN it says I need to call SqlDataAdapter.Fill() to retrieve the schema of a couple of tables at once. However, even though I've set the SqlDataAdapter.MissingSchemaAction to AddWithKey, the Fill() function retrieves not only the Schema but all the data as well.
How can I just retrieve the schema of some tables at once?
Any help is appreciated.
www.axeldahmen.de
Axel Dahmen
----
Here's the code I'm currently using:
{
SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM dbo.orgunit "
+ "SELECT * FROM dbo.employee "
+ "SELECT * FROM dbo.customer "
, ConnectionString);
DataSet schemaInfo = new DataSet();
adp.MissingSchemaAction = MissingSchemaAction.AddWithKey;
adp.Fill(schemaInfo);
}