D
David Mueller
My code works, but am I doing something slightly wrong? If the table
doesn't exist an error is raised. Notice, I didn't specify the dbFailOnError
option.
Is that normal behavior? Is it a difference between DDL and DML SQL, or
should I not be using a DAO workspace?
On error goto ...
Dim wsp As DAO.Workspace
Dim db_wsp As DAO.Database
Set wsp = DBEngine.Workspaces(0)
Set db_wsp = wsp(0)
wsp.begintrans
strSQL = "DROP TABLE MyTableName;"
db_wsp.execute strsql
wsp.committrans
set nothings, etc ....
Thanks,
David
doesn't exist an error is raised. Notice, I didn't specify the dbFailOnError
option.
Is that normal behavior? Is it a difference between DDL and DML SQL, or
should I not be using a DAO workspace?
On error goto ...
Dim wsp As DAO.Workspace
Dim db_wsp As DAO.Database
Set wsp = DBEngine.Workspaces(0)
Set db_wsp = wsp(0)
wsp.begintrans
strSQL = "DROP TABLE MyTableName;"
db_wsp.execute strsql
wsp.committrans
set nothings, etc ....
Thanks,
David