Forum Moderators: open

Message Too Old, No Replies

ASP DB Driver Error

Jet DSN? OLE?

         

neh2008

9:06 pm on Jul 16, 2003 (gmt 0)

10+ Year Member



Hi!

I am a novice ASP programmer. I get the following error while working with one of the pages which connects to the access database.

E R R O R
--------------------------------------------------------
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 0x5e8 Thread 0x7f4 DBC 0x391000c Jet'.

/xx/pagename.asp, line 12

Internal Server Error
--------------------------------------------------------

connection string
--------------------------------------------------------

<%

mpath="databases/db.mdb"
dsn = "DBQ=" & Server.Mappath(mpath) & ";Driver={Microsoft Access Driver (*.mdb)}; PWD="
%>
--------------------------------------------------------

I dont know what to do here. It was working yesterday and collected some data too, Today its just not working. I am lost because of its randomness.

Thanking,
Neh

DaveN

8:07 am on Jul 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Priviliges problems for the IUSR_ account

Open Explorer and find the \WINNT\Temp directory.
select the "Security" tab under the "Properties" and add "iusr_" account ("IUSR_", Internet Guest User.)

In the "Permissions" box allow only :
List Folder Contents
Read
Write permissions

It also cleck the checkbox saying "Allow inheritable from parent to propagate this object

Dave

gangstah

12:47 pm on Jul 20, 2003 (gmt 0)

10+ Year Member



This is what I've always done, I've gone into IIS, selected the directory where my db is located, right click, Properties and selected the Write checkbox. Then I go to the directory where the db is located using Windows Explorer, right click, properties and select security tab. Seems most of the time the IUSR account isn't listed so I have to add it and then add the "List Folder Contents", "Read" and "Write" permissions.

DaveN...what does setting the permissions on the WINNT/temp directory do if the db isn't there?

Always learning something.

breichel

1:01 pm on Jul 21, 2003 (gmt 0)



This is a new occurance with using Access 2000/2002 as your database. Try using this as a connection string.

cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
cst = cst & server.mappath("database.mdb")
set conn = Server.CreateObject("ADODB.Connection")
conn.open cst

gangstah

1:07 am on Jul 22, 2003 (gmt 0)

10+ Year Member



breichel is probably right in the above post...but you'll also need to set those write permissions (for inserts, updates and deletes).

neh2008

6:50 pm on Jul 25, 2003 (gmt 0)

10+ Year Member



I had read it on the microsoft site too.

It doesn't make sense to allow the read and write access to the Folder where database is. But I did it anyways and it worked great. Still working after 4 days.

I dont like the way MS is doing stuff, and these "unkown errors".

I am glad I had you people with me.

Thanks,
Neh

neh2008

6:51 pm on Jul 25, 2003 (gmt 0)

10+ Year Member



Can I connect to database on a different machine, now?

I want to connect to a database on a totally remote machine. :)

I dont know how to do this, but keep reading about ADO and hope I get this done sometimes.

Neh

gangstah

12:26 pm on Jul 26, 2003 (gmt 0)

10+ Year Member



That's a tough one (for me anyway), I *think* if you share out the Access database on the network and then setup a DSN to that database it *might* work. I don't think a DSNless connection will work because I *think* you need a straight file path in your connection string ("d:\dbpath\accessdb.mdb" rather than "\\computeronnetwork\folder\accessdb.mdb"). I hope that helps, give it a shot and let us know.

neh2008

9:32 pm on Jul 26, 2003 (gmt 0)

10+ Year Member



Sure, I will let you know. But I *think* I have to use IP address though.