By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,131 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,131 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Showjumper" <sh*******@grkjashdjkf.com> wrote in message
news:ez****************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.