Question : Data source name not found and no default driver specified

Yes, another of these for the collection...

I have an existing asp application running on a server and I'm attempting to migrate to another machine for testing/update purposes. However I'm getting the above error (specifically "Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager]") when I attempt to connect to the database.

I've tried several different things to get this working properly (changing the connection string to a more absolute path, double checking permissions, etc) so far I'm at a dead end.

Any help would be greatly appreciated.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
The relevant portion from the global.asa is:
  Application("Connection1_ConnectionString") = "DBQ=..\dbfolder\myDB.mdb;DefaultDir=..\dbfolder;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;;User Id=admin;"
		Application("Connection1_ConnectionTimeout") = 15
		Application("Connection1_CommandTimeout") = 30
		Application("Connection1_CursorLocation") = 3
		Application("Connection1_RuntimeUserName") = "admin"
		Application("Connection1_RuntimePassword") = ""
 
The line of the app where the error is created is:
  DBConn.Open(Application('Connection1_ConnectionString'), Application('Connection1_RuntimeUserName'), Application('Connection1_RuntimePassword'));
Open in New Window Select All

Answer : Data source name not found and no default driver specified

This has helped me with connection strings in the past:

 1. In Notepad, or any other text editor, create a file named Temp.udl  

 2. Leave the file empty and save it to the Desktop

 3. Double-click the Temp.udl file

 4. The Data Link Properties dialog box appears

 5. In the Data Link Properties dialog box, click Provider. Select the appropriate provider from the list

 6. Click Connection and select the corresponding name of the server and the database
    Type the User Name and the Password
 
 7. Click Test Connection to test the connection

 8. Click OK

 9. Right-click Temp.udl and click 'Open With'
   
    If Notepad shows up as an option, click it, otherwise click 'Choose Program' and navigate
    through the list to notepad and select it

10. Copy the connection string to your application

Random Solutions  
 
programming4us programming4us