Hello,
I am new at scripting and having some problems with syntax on EXECUTE cmd
I was traying to reset the primary key on an access db table but I thought it was easier to delete the table and recreate it again.
the following code fails on the last line which is supposed to delete the table. It seems like it is missing a parameter but I am not sure what.
Set cnxAccess = CreateObject("A DODB.Connection ")
cnxAccess.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & strAccessFile & ";" & _
"Persist Security Info=False"
Set rstAccess = CreateObject("A DODB.Recordset" )
cnxAccess.Execu te "DELETE TABLE sheet1"
What is wrong with the Execute command?
Thanks,
Kenxo
I am new at scripting and having some problems with syntax on EXECUTE cmd
I was traying to reset the primary key on an access db table but I thought it was easier to delete the table and recreate it again.
the following code fails on the last line which is supposed to delete the table. It seems like it is missing a parameter but I am not sure what.
Set cnxAccess = CreateObject("A DODB.Connection ")
cnxAccess.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & strAccessFile & ";" & _
"Persist Security Info=False"
Set rstAccess = CreateObject("A DODB.Recordset" )
cnxAccess.Execu te "DELETE TABLE sheet1"
What is wrong with the Execute command?
Thanks,
Kenxo
Comment