TableDefs in .net

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??
 
T

Tim Ferguson

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
 
J

Joe Fallon

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"})
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top