Search code examples
asp.netvb.netodbcjetdbase

Can't connect to dBase files from web app


I have a web app, written about 10 years ago (VB.NET/ASP).
It uses the following connection string to connect to dBase 5 files:

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=[SOURCE_PATH];

This has been working great for years. Now we are moving this app to a 64 bit server, and this connection is now giving me

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I've read numerous suggestions in numerous threads, including changing the above connection string to

Microsoft.Jet.OLEDB.4.0; or Microsoft.Jet.OLEDB.12.

but that didn't do anything.

I also tried setting Enable 32-Bit Applications settings on the application pool on the web server to TRUE, but that resulted in

HTTP Error 503. The service is unavailable

Can somebody point me in the right direction please??


Solution

  • Try to change your connection string from

    Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=[SOURCE_PATH];
    

    to

    Driver={Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[SOURCE_PATH];Extended Properties=dBASE 5.0;}
    

    You also have to change your code from ODBC objects (DataSet, etc), to OLEDB objects.