Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Source name not found

Status
Not open for further replies.

smsinger3

Programmer
Joined
Oct 5, 2000
Messages
192
Location
US
Hello all. I am having a problem where I can't logon to a sql server 7 database in asp. I have no idea why. Here is the error I am getting:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified


I get the error with any of these connection strings:
1) DSN=dsnname;SRVR=servername;UID=logonid;PWD=password
2) ODBC;DSN=dsnname;SRVR=servername_dev;UID=logonid;PWD=password
3) DSN=dsname;DATABASE=databasename;Provider=MSDASQL.1;UID=logonid;PWD=password
--------------------

Here is the code that I execute:

Set l_adoConn = CreateObject("ADODB.Connection")
l_adoConn.ConnectionTimeout = Application("ConnTimeout")
l_adoConn.open conn_str <...the connection strings from above ...>

Do you know why I keep getting this error? I'm sure it's something stupid...

thanks for your help!

Steve S
sms@hmbnet.com




 
I am presuming you have a System DSN set up on your server pointing to the SQL database. Try the following connection string...

&quot;myDSN&quot;, &quot;MyUserName&quot;, &quot;MyPassword&quot;

Always seems to work for me.

G -GTM Solutions, Home of USITE-
-=
 
Hello,
Look at faq333-178 also.
D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top