By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,764 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

How to fix "Data source name not found" error when connecting to MS SQL in Perl?

100+
P: 147
Hi,

In ODBC, i given data source name and the test connection is also successful.


But i don't know, why i am facing this error
[Thu Feb 10 12:35:09 2011] [error] [client 127.0.0.1] DBI connect('wwwdsn','webid',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002) at C:/Program Files/Apache Group/Apache2/cgi-bin/auth/studpass.cgi line 20, referer: http://localhost/student.html
[Thu Feb 10 12:35:09 2011] [error] [client 127.0.0.1] Can not connect: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002), referer: http://localhost/student.html
Feb 10 '11 #1
Share this Question
Share on Google+
4 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
When you are using a database, you need to ensure that the correct DBD driver is installed and that you reference it in your code. This is probably the one you want.

As for the data source, you should probably examine the DBI documentation and ensure you are referencing everything correctly. If it cannot find the data source then you possibly referenced something incorrectly.

Regards,

Jeff
Feb 10 '11 #2

100+
P: 147
Hi,
I can't get from this documentation. Please give me some other solution.Thanks
Feb 10 '11 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
You cannot get what from the documentation? You have to install the CPAN module that I gave you the link to. Without it, you cannot use DBI on an ODBC database. The documentation won't tell you how to install it, just use it.

Regards,

Jeff
Feb 10 '11 #4

numberwhun
Expert Mod 2.5K+
P: 3,503
You cannot get what from the documentation? You have to install the CPAN module that I gave you the link to. Without it, you cannot use DBI on an ODBC database. The documentation won't tell you how to install it, just use it.

Regards,

Jeff
Feb 10 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.