ADO vs DAO

  • Thread starter Thread starter Chris Nebinger
  • Start date Start date
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?
 
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


.
 
Back
Top