0
votes

i'm using a connectionstring as follows:

<add name="ConnectionString" connectionString="Driver={Microsoft Access Driver (*.mdb, *.accdb)};dbq=D:\Year1213\projects\arshad0413\App_Data\Database21.accdb;defaultdir=D:\Year1213\projects\arshad0413\App_Data;driverid=25;fil=MS Access;maxbuffersize=2048;pagetimeout=5;uid=admin"
  providerName="System.Data.Odbc" />

And I'm getting this error.

Exception Details: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

It works fine on localhost, but when uploaded to server it doesn't work. What might be causing this?

1
Possibly a permissions issue -- locally, your account has access to the db in your d drive. When published (IIS?) your aspnet user possibly doesn't.sgeddes
But when I changed the connectionstring from microsoft access to Microsoft SQL, it works perfectly fine. Both the access file and the sql file is in the same folder. So surely I have access on the server. So maybe access driver isn't installed on the server?Arshad Ãršhâd Jugon
Can you post your SQL Server connection string that is working for you? Is it pointing at a D drive file or the server/db instance? Usually you'd be pointing at the server/db and not a file location when using SQL Server and thus the security is handled differently. Also, I wonder if this might not help: connectionstrings.com/accesssgeddes

1 Answers

0
votes

You might be using 64bit JVM.use 32bit JVM instead. I was facing same problem while using 64bit JVM, but 32bit jvm solved my problem.