R
Roger
I've written a program in MS Access 2000 that grabs data from a
dBase IV table and then displays it on a form. It works fine in
a Windows 2000 environment, but I get a run-time error when I
run the very same program in a Windows XP Pro (SP2) environment.
All Office updates and XP updates are installed.
The code where the error is generated is as follows:
-----------------------------------
Dim pPath As New ADODB.Connection
Dim pTable As New ADODB.Recordset
pPath.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\DATA\;Extended Properties=""DBASE IV;"";"
pTable.Open "Table1.DBF", pPath
-----------------------------------
The program bombs on the 4th statement (pTable.Open) when I try
to open Table1. The error that I get is:
Run-time error '-2147217900(80040e14)': Invalid SQL statement;
expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
I tried changing the Provider to "Driver={Microsoft dBASE Driver
(*.dbf)}; DriverID=277; Dbq=C:\DATA\;" and this time the error I
got was:
Run-time error '-2147217900(80040e14)': [Microsoft][ODBC dBase
Driver] Invalid SQL statement; expected 'DELETE', 'INSERT',
'PROCEDURE', 'SELECT', or 'UPDATE'.
I can't figure this error out keeping in mind that the program
works fine in Windows 2000 but not XP. I believe the program
ceased to work in XP after SP2 was installed - not 100% sure.
Any ideas?
Thanks,
Roger
dBase IV table and then displays it on a form. It works fine in
a Windows 2000 environment, but I get a run-time error when I
run the very same program in a Windows XP Pro (SP2) environment.
All Office updates and XP updates are installed.
The code where the error is generated is as follows:
-----------------------------------
Dim pPath As New ADODB.Connection
Dim pTable As New ADODB.Recordset
pPath.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\DATA\;Extended Properties=""DBASE IV;"";"
pTable.Open "Table1.DBF", pPath
-----------------------------------
The program bombs on the 4th statement (pTable.Open) when I try
to open Table1. The error that I get is:
Run-time error '-2147217900(80040e14)': Invalid SQL statement;
expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
I tried changing the Provider to "Driver={Microsoft dBASE Driver
(*.dbf)}; DriverID=277; Dbq=C:\DATA\;" and this time the error I
got was:
Run-time error '-2147217900(80040e14)': [Microsoft][ODBC dBase
Driver] Invalid SQL statement; expected 'DELETE', 'INSERT',
'PROCEDURE', 'SELECT', or 'UPDATE'.
I can't figure this error out keeping in mind that the program
works fine in Windows 2000 but not XP. I believe the program
ceased to work in XP after SP2 was installed - not 100% sure.
Any ideas?
Thanks,
Roger