TableDefs in .net

  • Thread starter Thread starter Eran
  • Start date Start date
E

Eran

Hi
How do i loop through access tables in .net .
in the past in vb6 i used
For Each SrcTable In .TableDefs
but mow i can't find TableDefs in .net db connection
property .
Is still in use in .net or there is other
property/attribute ??
is there any other way to loop over all mdb tables without
selecting them to recordset??
 
For Each SrcTable In .TableDefs
but mow i can't find TableDefs in .net db connection
property .

Tabledefs is a DAO property, so if you have defined your Database object as
a DAO.Database, and then it should still be fine. You may find that your
host environment thinks that ADO is just minty, so you'll need to explore
the ADOX objects.

Hope that helps


Tim F
 
You need to fill a datatable with the list of tables in the mdb.
This code does that:

dt = cnn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object()
{Nothing, Nothing, Nothing, "TABLE"})
 
Back
Top