|
-
Jul 6th, 2001, 09:35 PM
#1
Thread Starter
Addicted Member
Cursor error when updating and sometimes when browsing through records...
I just finished my asp web sites. It works perfectly under PWS. When accessing it on IIS from my computer, and when I'm the only person browsing it, perfect, no problem.
BUT, as soon as two or more people are browsing it, I get server error regarding "bad cursor location" (Can't remember I'm home right now and the IIS server is at work).
When a user want to update a record he simply get the "Web Page not accessible" error. But this was working under PWS and when I'm the only user !?!
Anyway here's how I declared my DB connections and recordsets :
Code:
'****************************************************
' DB Connection
'****************************************************
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
' Ouvrir la Connexion
objConn.ConnectionString = "DSN=" & Application("DBApp")
objConn.Open
'****************************************************
'**************************************
' RecordSet
'**************************************
Dim rsLogiciels
Set rsLogiciels = Server.CreateObject("ADODB.Recordset")
rsLogiciels.ActiveConnection = objConn
rsLogiciels.CursorType = adOpenKeySet
rsLogiciels.CursorLocation = adUseClient
rsLogiciels.LockType = adLockOptimistic
rsLogiciels.Source = "Logiciels"
rsLogiciels.Open
rsLogiciels.MoveFirst
PLease help me !
-
Jul 6th, 2001, 10:24 PM
#2
Fanatic Member
Are you using a disconnected recordset?
If so you need to set the active connection to nothing after you open the recordset. I think you also have to have the locktype set to adLockBatchOptimistic.
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|