G
Guest
I'm converting an mdb database application to use a SQL backend and moving it
to an ADP. One of the first things I do is check for the existance of a
table by looping through the tabledefs object. It works in the mdb, but not
in the ADP. I have the reference to DAO 3.6 and it recognizes the object
properties that I'm using, but it won't allow me to set a variable
obstantiated as a tabledefs object to the currentdb.tabledefs property.
Here's the code...
Dim tbls As TableDefs, tbl As TableDef
Dim fTableExists As Boolean
fTableExists = False
For Each tbl In CurrentDb.TableDefs
If tbl.Name = strTblName Then
fTableExists = True
Exit For
End If
Next tbl
Is there a different way that I should be trying to verifiy the existance of
a SQL table in an ADP?
I'm sure that I'm going to run across many different anomolies converting
over to an ADP and working with SQL, but I'm not sure how compatible the DAO
library is with the SQL back end. Any tips or good books that I can
reference for the conversion?
to an ADP. One of the first things I do is check for the existance of a
table by looping through the tabledefs object. It works in the mdb, but not
in the ADP. I have the reference to DAO 3.6 and it recognizes the object
properties that I'm using, but it won't allow me to set a variable
obstantiated as a tabledefs object to the currentdb.tabledefs property.
Here's the code...
Dim tbls As TableDefs, tbl As TableDef
Dim fTableExists As Boolean
fTableExists = False
For Each tbl In CurrentDb.TableDefs
If tbl.Name = strTblName Then
fTableExists = True
Exit For
End If
Next tbl
Is there a different way that I should be trying to verifiy the existance of
a SQL table in an ADP?
I'm sure that I'm going to run across many different anomolies converting
over to an ADP and working with SQL, but I'm not sure how compatible the DAO
library is with the SQL back end. Any tips or good books that I can
reference for the conversion?