I got successully the connection to an Access DB using ODBC provider "DSN user" using "Microsoft Access Driver (*.mdb)" driver (version 4.006305.00, ODBCJT32.DLL) on a Windows XP Professional 32-bit Platform as shown in the code below:
SQLConnectionString := 'C:\AF\DecryptDatabase.mdb';
ODBCConnection := ODBCConnection.OdbcConnection(SQLConnectionString);
ODBCConnection.Open();
ODBCCommand := ODBCConnection.CreateCommand();
ODBCCommand.CommandText := 'select * from tablename';
ODBCReader := ODBCCommand.ExecuteReader();
I moved exactly the same code on a Windows Server 2012 64-bit Platform using the same ODBC provider "DSN user" using "Microsoft Access Driver (*.mdb)", but with a more recent driver version (6.00).
Running the same code, it occurs the following error (see the attached picture to look at whole error message):
"The call to member Open failed: error [hy000] [Microsoft] [odbc microsoft access driver] Disk or network error"
I have already checked permissions on the database folder (now is locally to the client).
Please do you have any ideas how to solve this problem?
Comments
Sorry maybe that is not why it fails because I tried to allocate the same database in different machine using the LAN (changing the connection string, e.g. \\client1\databasefolder\database.mdf) and it work perfectly in the right environment. I suppose that it is different problem.
Please do you have any other insights?
Thank you
No better ideas...
http://support.microsoft.com/kb/942976
Odbcad32.exe
http://www.BiloBeauty.com
http://www.autismspeaks.org