ADO vs DAO

C

Chris Nebinger

You need to use ADOX to access the objects in the table.

Using plain ADO, you could check the MSYSObjects table for
the name of the table.

Dlookup("Name","MSYSOBJECTS","[Name]='" & strTable & "'
AND Type in (1,6)")

Also, you can keep using DAO and ADO in the same project,
it isn't really bad form. You should disambiguate the
references

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim con as ADODB.Connection
Dim rs As ADODB.Recordset




Chris Nebinger

-----Original Message-----
Hello,

I use the following code to check for existence of a
table. I think it is "in DAO". However, I have been
trying to work "in ADO". What is the ADO approach/syntax
to determine existence of a table? Is it a bad idea to
mix DAO and ADO in the code behind a single Form, for
instance? Or is it just bad form, but with no fatal
consequences?
 
G

Guest

Awesome! Thanks Chris.
RichardA

Chris Nebinger said:
You need to use ADOX to access the objects in the table.

Using plain ADO, you could check the MSYSObjects table for
the name of the table.

Dlookup("Name","MSYSOBJECTS","[Name]='" & strTable & "'
AND Type in (1,6)")

Also, you can keep using DAO and ADO in the same project,
it isn't really bad form. You should disambiguate the
references

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim con as ADODB.Connection
Dim rs As ADODB.Recordset




Chris Nebinger

-----Original Message-----
Hello,

I use the following code to check for existence of a
table. I think it is "in DAO". However, I have been
trying to work "in ADO". What is the ADO approach/syntax
to determine existence of a table? Is it a bad idea to
mix DAO and ADO in the code behind a single Form, for
instance? Or is it just bad form, but with no fatal
consequences?
RichardA


.
 

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