Results 1 to 2 of 2

Thread: Cursor error when updating and sometimes when browsing through records...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Location
    Québec, Canada
    Posts
    212

    Exclamation 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 !
    Regards,

    El-Nino

  2. #2
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    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
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width