Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Database connection problem...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

james1415
Starting Member

1 Posts

Posted - 22 August 2001 :  18:23:08  Show Profile  Send james1415 an ICQ Message
Hi,
Ive got a database connection error...

This is the error:

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

/uniqueuk/index.asp, line 29

It shows the rest of the page, because that is a news database its trying to connect to...

The ASP source code for the database connection that im using is:

<%
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "driver={Microsoft Access Driver 2000 (*.mdb)};dbq=" & Server.Mappath("dbase/news.mdb")

Set RecSet = Server.CreateObject("ADODB.Recordset")
view = "SELECT * FROM News ORDER BY ID DESC"

RecSet.Open view, Connect, adOpenStatic, adLockOptimistic
Do Until RecSet.EOF
%>

The path to the database is correct, the directroy setup is:

\htdocs > \uniqueuk | \dbase

Obviously theres others in the htdocs (pulic so to speak) directory, im just trying some code out.

This is pretty urgent, as I need it all done by Saturday and I have about 4 more of these to sort out, the others work!

The address to the problem is: www.unique-hardware.co.uk/uniqueuk/index.asp its an old site of mine, and I am going to use the ASP code from it to intregrate it into my new site (unique-hardware.co.uk)

PLEASE HELP!!




Edited by - james1415 on 22 August 2001 18:24:29

Doug G
Support Moderator

USA
6493 Posts

Posted - 23 August 2001 :  01:14:37  Show Profile
There is no 2000 in the driver name for the Access ODBC driver you're using.

Try this:

Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.Mappath("dbase/news.mdb")


======
Doug G
======
Go to Top of Page

james1415
Starting Member

1 Posts

Posted - 23 August 2001 :  06:49:00  Show Profile  Send james1415 an ICQ Message
All sorted now, one of the include files: adovbs.inc needed ../ at the beginning!!!!!

Ive intergrated that script into my main that doing in ASP: www.unique-hardware.co.uk/asp_testing/default.asp

More to do though :(

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07