Hi everyone. I am trying to read the table columns definitions of tables in an access database. How can I do this?
Thank you very much...!
Printable View
Hi everyone. I am trying to read the table columns definitions of tables in an access database. How can I do this?
Thank you very much...!
bump :)
Hi
Well checkout the dataset class in msdn there's everything you need...
Regards
Jorge
how can the dataset help me reading the column type, length, if it is the primary key, max length of field, etc???
Hi
As you know a dataset is a collection of datatables and each datatable is a collection of DataColumn and DataRow. The DataColumn has many useful properties one of them being .DataType.
Just browse all DataColumns of each table you need to gather information.
Regards
Jorge
ok sounds good.... oh... hummm... so when yo do a dataadapter.fill(table) the table object columns will have that info automatically?????
Yes if you select all fields in the table like this 'select * from Mytable'Quote:
Originally posted by Andreex
ok sounds good.... oh... hummm... so when yo do a dataadapter.fill(table) the table object columns will have that info automatically?????
Regards
Jorge
oh ok... well that makes a lot of sense...
thanks a lot for your help