Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / June 2007



Tip: Looking for answers? Try searching our database.

Data source name not found and no default driver specified

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rabblerowzer@yahoo.com - 06 Jun 2007 00:33 GMT
Hi, I have IIS and SQL Server2K on the same machine where I am trying
to get an ASP file to return data. I can not get past this one error
though:

ERROR MESSAGE:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/WebFiles/Page1.asp, line 122

I've messed with and tripple checked each of the areas below
-Web Site's Configuration in IIS
-Registry key associated with ODBC Driver
-ODBC driver / DSN
-Changed the connection string in every way.

CONNECTION STRING:
MyConn= "PROVIDER=SQLOLEDB.1;DATA
SOURCE=xxx.xxx.xx.xx;UID=User;PWD=pwd;Network
Library=dbmssocn;Initial
Catalog=DB Name;"

LINE 122:
               <%Set MyConn = Server.CreateObject
("ADODB.Connection")
%>
               <%Set RS=Server.CreateObject ("ADODB.RecordSet")%>

Any ideas?

Thanks,
Bob Barrows [MVP] - 06 Jun 2007 00:48 GMT
> Hi, I have IIS and SQL Server2K on the same machine where I am trying
> to get an ASP file to return data. I can not get past this one error
[quoted text clipped - 17 lines]
> Library=dbmssocn;Initial
> Catalog=DB Name;"

Well, this is the correct connection string to use
(http://www.aspfaq.com/show.asp?id=2126). What error do you get when you use
it?

Why is it so important to use the IP address with the sql server on the same
machine? Use (local) for the data source instead of the IP.
The connection string attributes should be user id instead of uid, and
password instead of pwd (but this is not your problem)

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

rabblerowzer@yahoo.com - 06 Jun 2007 01:26 GMT
On Jun 5, 4:48 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
> rabblerow...@yahoo.com wrote:
> > Hi, I have IIS and SQL Server2K on the same machine where I am trying
[quoted text clipped - 35 lines]
>
> - Show quoted text -

Hi Bob,

OK I changed the connection string exactly as you suggested, but I
still get the same error. Any other ideas?

Thanks,

Russ
Bob Barrows [MVP] - 06 Jun 2007 01:47 GMT
> On Jun 5, 4:48 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
> wrote:
[quoted text clipped - 30 lines]
>> The connection string attributes should be user id instead of uid,
>> and password instead of pwd (but this is not your problem)

> Hi Bob,
>
> OK I changed the connection string exactly as you suggested, but I
> still get the same error. Any other ideas?

Instead of using (local), use the actual name of your sql server, which is
usually the same as the name of the machine on which it resides. The only
exception is if you've created multiple instances on the machine.

Use Query Analyzer to run this statement:
Select @@SERVERname

This will show the name of the server to be used as the data source.

If you'e still having problems, show me the new connection string and the
text of your error.

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.