M
MyndPhlyp
Using Access 2000, ADO (MDAC v2.8) and the Microsoft Visual FoxPro ODBC
driver (v6 something), I'd like to issue a command to the FoxPro database to
pack various tables.
Under DAO, this would be done using the Command.SQLExecute method.
Under ADO, this has been somewhat replaced by the Command.Execute method.
The problem is, no matter how I arrange the options, I can't get past Jet.
For example:
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdUnknown)
or
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdText)
Returned (from my ADO error trap):
Error number: -2147217900
Description : Invalid SQL statement; expected 'DELETE', 'INSERT',
'PROCEDURE', 'SELECT', or 'UPDATE'.
Source : Microsoft JET Database Engine
SQL State : 3000
Native Error: -533138860
Also tried:
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdStoredProc)
And got (from my ADO error trap):
Error number: -2147217900
Description : Expected query name after EXECUTE.
Source : Microsoft JET Database Engine
SQL State : 3732
Native Error: -230690241
Is there another way of doing this through Connection (or any other method)
using ADO?
driver (v6 something), I'd like to issue a command to the FoxPro database to
pack various tables.
Under DAO, this would be done using the Command.SQLExecute method.
Under ADO, this has been somewhat replaced by the Command.Execute method.
The problem is, no matter how I arrange the options, I can't get past Jet.
For example:
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdUnknown)
or
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdText)
Returned (from my ADO error trap):
Error number: -2147217900
Description : Invalid SQL statement; expected 'DELETE', 'INSERT',
'PROCEDURE', 'SELECT', or 'UPDATE'.
Source : Microsoft JET Database Engine
SQL State : 3000
Native Error: -533138860
Also tried:
varReturn = cn.Execute("SET EXCLUSIVE ON; PACK MYTABLE", ,
ADODB.adExecuteNoRecords + ADODB.adCmdStoredProc)
And got (from my ADO error trap):
Error number: -2147217900
Description : Expected query name after EXECUTE.
Source : Microsoft JET Database Engine
SQL State : 3732
Native Error: -230690241
Is there another way of doing this through Connection (or any other method)
using ADO?