Discussion Locked

Sporadic Access/VBScript ASP Problems

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi All!

I'm looking for some help with an intermittent VBScript problem I'm having when trying to talk to Access databases.

I often get the following error when going to pages, or reloading current sites.

Error Type:
Provider (0x80004005)Unspecified error
/workorders/userview.asp, line 17

Line 17 is the line with the *****

DBName = Server.MapPath("workorders.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
*****myConn.Open "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;"
Set myRS = Server.CreateObject("ADODB.Recordset")

As I said, the problem seems to be very sporadic. At times, it will work fine, other times I will have to reload each page several times to getthe error to go away.

If more source from the file is necessary, please let me know. Thanks for the help.

-S

5 replies

by andrew

I don't have a direct answer as to why you have problems, but I use an OLEDB connection string and never have problems. It takes this form:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DBFile.mdb;

Or if you need security:

Provider=Microsoft.Jet.OLEDB.4.0;Password=password;User ID=UserName;Data Source=C:\DBFile.mdb;

Hope this helps.

by raffi_

One common cause of this error is a server time-out. Adjust the ODBC page timeout values.

Another common cause of this error is that you have a field that does not allow a zero-length string but the form pases one to it. This would explain the sporadic nature of your problem. Sometimes the field has a value and sometimes it does not.

Check your Access table definitions to see if one field does not allow a NULL.

Regards
Raffi_

This discussion is closed to new replies.