Timothy Parez wrote:

Hello,
I have an Access database which I access with System.Data.OleDb
but I would like to enumerate all the tables in that database
How can I do this ?
you have to call GetOleDbSchemaTable on your instance of OleDbConnection in this way:

DataTable dt = dbcon.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new
                        object[4] {null, null, null, "TABLE"});
foreach(Row r in dt.Rows) {
string tableName = r["TABLE_NAME"];
...
}

look at GetOleDbSchemaTable docs on msdn for more info.
btw this code won't work with mono since that method is not implemented.

MC

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to