Forum: Geek Forum
Topic: ASP Help
started by: ShakerMaker

Posted by ShakerMaker on Feb. 26 2002,07:01
Having trouble with some ASP poll. (Yes, I'm a newbie.) ???

This is the error!
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x470 Thread 0x490 DBC 0x3215d2c Jet'.


I'm using brinkster and they suggest to insert this code
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\UserName\db\dbname.mdb")


I have NO idea where they want me to put this.

Any ideas?


Posted by damien_s_lucifer on Feb. 26 2002,09:08
No, except that ASP sucks.

Good luck.
Posted by ShakerMaker on Feb. 26 2002,09:38
Quote (damien_s_lucifer @ 26 Feb. 2002,01:08)
No, except that ASP sucks.

Good luck.

Ok. What should I use instead of ASP?
I'll I need is a poll. And I aint gonna use those shitty free ones with banners all over them.
Posted by Wiley on Feb. 26 2002,15:51
Just to be clear, you are trying to use MS Access as your backend right?   Have you setup a DSN for your database through the ODBC control panel?
Posted by Anztac on Feb. 26 2002,23:56
/me shivers
Posted by ShakerMaker on Feb. 27 2002,11:11
Quote (Wiley @ 26 Feb. 2002,07:51)
Have you setup a DSN for your database through the ODBC control panel?

I have no fucking idea mate. Most likely not.


Posted by Wiley on Feb. 27 2002,15:26
DBQ=" & Server.MapPath("\UserName\db\dbname.mdb")

First things first, do you know the relative path to your database to use? Or the absolute path to the database (something like C:\inetpub\wwwroot\yourwebsite\database\poll.mdb)

Basically anytime you see the ODBC error it's just Microsoft saying "Dude, where the fuck is your database?".
Posted by ShakerMaker on Feb. 28 2002,05:25
Quote (Wiley @ 27 Feb. 2002,07:26)
DBQ=" & Server.MapPath("\UserName\db\dbname.mdb")

First things first, do you know the relative path to your database to use? Or the absolute path to the database (something like C:\inetpub\wwwroot\yourwebsite\database\poll.mdb)

Basically anytime you see the ODBC error it's just Microsoft saying "Dude, where the fuck is your database?".

Ahh! I get it. So where bouts in my script do I throw that line?
Posted by Wiley on Mar. 01 2002,03:46
Quote (ShakerMaker @ 27 Feb. 2002,21:25)
Ahh! I get it. So where bouts in my script do I throw that line?

At the very top  ...above the <HTML> line even.  I would talk to your ISP though and see if they can setup a DSN for you, you'll get better performance and not have to reley on a path (virtual or absolute) to the database.

Here are some different ways to connect to your MS Access file.


MS Access 97 with virtual path
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/files/database.mdb")

MS Access 97 with absolute path
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\wwwroot\yoursite\files\database.mdb"

MS Access 2000 with virtual path
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/files/database.mdb")
Posted by Anztac on Mar. 01 2002,09:29
Gahhhhh!  Make it stop!!  It hurts my virgin eyes!!!
Posted by ShakerMaker on Mar. 03 2002,10:40
Thanks Wiley.
Powered by Ikonboard 3.1.4 © 2006 Ikonboard