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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Connect To Access from ASP Page On Dev Server

Status
Not open for further replies.

MarkGordon

Programmer
Jun 11, 2003
4
US
Hi All,

I just setup a development IIS 5.0 server on my XP Professional OS. I also setup a test MS Access Database in a subdirectory of the web server. I went through the process of setting up an ODBC Connection through the ODBC Connection Wizard by adding a User DSN, calling it "Music".

I referred to this database in my ASP script as follows:

<%
Set Catalog=Server.CreateObject(&quot;ADODB.Recordset&quot;)
Catalog.open &quot;SELECT * FROM Catalog&quot;, &quot;DSN=Music&quot;
Do WHILE NOT Catalog.EOF
Response.Write Catalog(&quot;Title&quot;) & &quot;<p>&quot;
Catalog.MoveNext
Loop
%>

I saved this file as a &quot;SQL_TEST.asp&quot; page in the same directory that the database (Music.mdb) resides in.

The problem is when I try to open this page in the browser, I get the following error message (MicroSoftly Cryptic as usual):
--------------------------------------
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/development/ABG_ASP/SQL_TEST.asp, line 9


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Page:
GET /development/ABG_ASP/SQL_TEST.asp
---------------------------------------------

Any thoughts as to where I should be looking, or maybe I missed a step or two?

My IIS shows the Default ASP Language as VBSCript.

Thank you for taking the time to help me with this question.

Mark Gordon
 
Some machines need a reboot after setting a system DSN, otherwise, could you use a DSNless connection?

BDC.
 
>>Some machines need a reboot after setting a system DSN

I tried that and it didn't work.

>>could you use a DSNless connection?

I could solely for a testing purpose, however I'm trying to keep it exactly as it is on the Production server, so I'd rather figure out why it's freaking out like this. I have no control on the Production side, so I need to keep my environment exactly like the Production side of the house.
 
OK, got it solved. I had set up a &quot;User DSN&quot; instead of a &quot;System DSN&quot;....totally &quot;stoopid&quot; mistake, but once corrected, makes it work like a charm.....remember, if you're going to use the Database with your Web Server, make it a &quot;System DSN&quot;, not a &quot;User DSN&quot;.

Thanks for the help in responding.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top