cancel
Showing results for 
Search instead for 
Did you mean: 

[Microsoft][ODBC Driver Manager] Data source name not found

Former Member
0 Kudos

Hi,

I have a method in an ejb, using which i am trying to read an MS Access database.

The code is ok and i have tested it by writing in Main() and running it.

I have deployed the bean(NDS) and exposed it as one of the webservices in the server. When i test the webservice, i get the following error:

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

Could anyone help me out please?

Regards,

Anagha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anagha,

The possibilities of error are

1. The page can't find the DSN. Make sure a DSN has been created on both the web server and on the local machine.

2. The DSN might have been set up as a user DSN, not as a system DSN. Delete the user DSN and create a system DSN to replace it.

Note: If you don't delete the user DSN, the duplicate DSN names produce a new ODBC error.

3. If you use Microsoft Access, the database file (.mdb) might be locked. The lock might be due to a DSN with a different name accessing the database. In Windows Explorer, search for the lock file (.ldb) in the folder containing the database file (.mdb) and delete the .ldb file. If another DSN is pointing to the same database file, you may want to delete the DSN to prevent the error in the future. Be sure to reboot the computer after making these changes.

Regards,

Sai

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sai,

Thanks a lot. I could solve the problem by configuring dsn in the server. Full points to you.

Regards,

Anagha

Former Member
0 Kudos

Hi Sai,

I have not yet tried with the setting of DSN in the server. Full points to you if it works that way.

I shall revert back once I try it out.

Thanks,

Anagha

Former Member
0 Kudos

Hi Anagha,

1. Log on to the Web server computer as Administrator.

2. Click Start, point to Settings, and then click Control Panel.

3. Double-click Administrative Tools, and then double-click Data Sources (ODBC).

4. Click the System DSN tab, and then select the name that corresponds to the DSN driver i.e.Microsoft Access Driver (*.mdb).

5. Click Configure, and then click Advanced.

6. If you want to automatically provide logon credentials to the database when you use this DSN, type them into the Login name and Password boxes. Click OK.

7. Click OK, and then click OK again.

Try it out?

Regards,

Sai

Former Member
0 Kudos

Hi Sai,

The dsn that I am using was created under System dsn itself. You mentioned that I need to create the same on the server also. How exactly is that done?

Regards,

Anagha

Former Member
0 Kudos

Hi

You did not create a System DSN data source on the server, or your Web page file contains an incorrect reference to the System DSN data source name.

RESOLUTION

Follow these steps on your Web server computer to add a new System DSN or check the name of an existing data source:

1. Double-click the ODBC icon in Control Panel on your Web Server.

2. In the Data Sources dialog box, click System DSN.

3. Click Add if you do not see the name of the System DSN you used as the Data Source Name in the "Publish to the Web" Wizard.

4. Select Microsoft Access Driver, and then click Finish.

NOTE: If the Microsoft Access Driver does not appear, it is not installed on your Web server. For information about installing the driver on your Web server, search the Help Index for "Microsoft Access Desktop driver," or ask the Microsoft Access 97 Office Assistant.

5. Complete the ODBC Microsoft Access 97 Setup dialog box. The name you type in the Data Source Name box is the name you will use in the Data Source Name box in the "Publish to the Web" Wizard.

6. Click OK to close the ODBC Microsoft Access 97 Setup dialog box.

7. Click OK in the ODBC Data Source Administrator dialog box.

8. If the Data Source Name in the System DSN on your Web server is different from the one you used when you created your web pages, start the "Publish to the Web" Wizard in Microsoft Access and recreate your web pages using the correct Data Source Name.

Hope it helps

Regards,

Sai

Former Member
0 Kudos

Hi Sai,

My webservice resides in my local server itself. I am not using the "publish to the web" option.

I have correctly configured the dsn in control panel. Tried with both user and system dsn.

The code functions fine if i run it in Main().

What could be other sources of error?

Thanks,

Anagha