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

getting repeated errors after 2nd visit

Status
Not open for further replies.

A1Defiant

Technical User
May 24, 2001
22
0
0
GB
I keep getting this connection error after trying to access the same asp page several times over.

I guess it's to do with the connection I've setup. Here's my connection details,

<!--#include file=&quot;adovbs.inc&quot;-->
<% Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConn.ConnectionString=&quot;DRIVER={Microsoft Access Driver (*.mdb)};&quot; &

&quot;DBQ=W:/Miscellaneous/Wispa/Databases/WISPA.mdb&quot;
objConn.open
'Declare our variables
Dim duplicate, objConn, objRS

'Create our recordset object
Set objRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)


IS THERE SOMETHING OBVIOUS WHERE I MAYBE GOING WRONG?


Error Type:
Provider (0x80004005)
Unspecified error
/wispa/databases/AdminStatus3.asp, line 10
 
are you closing the connection after you are finished with it ---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
This is a common error when using Access. It is because IIS opens Access databases with 'adModeUnknown'. You can overcome this by setting the mode to 'adModeReadWrite' before opening the connection.

connstr=&quot;give the connection string here&quot;
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConn.mode=3
objConn.open connstr
 
Cheers, I've added
objConn.mode=adModeReadWrite

And hopefully this will sort it!
All okay so far!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top