Is it possible to get all the column names in a database table?

  • Thread starter Thread starter Showjumper
  • Start date Start date
S

Showjumper

Is it possible to retrieve a table name and then all the column names in
that table from an access database? And then once that is done, then build a
sql insert statement using the retrieved table and columns names?

Thanks
Ashok
 
Study the OleDb CommandBuilder and related classes. These are desgned to
take a SELECT statement and generate insert, update and delete logic
programmatically.

To just get a list of table names, you would use
OleDbConnection.GetOleDbSchemaTable with OleDbSchemaGuid.Tables

--Peter
 
Back
Top