Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 3rd, 2006, 08:52 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Current Recordset does not support updating.

I am getting the following error message when trying to update recordset in "While" looping:

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype(Although the record get updated when I update single record).

My code:

    set rsMoveNodeDown= Server.CreateObject ("ADODB.Recordset")

    sSQL = "SELECT * from Contents WHERE Parent = " & iParent & " AND Ordr in(" & iNode & "," & iNodeAfter & ") ORDER BY Ordr "
    'Response.Write sSQL
    'Response.End

    rsMoveNodeDown.Open sSQL, objConn,2,2 ' adOpenKeyset CursorType

While not rsMoveNodeDown.EOF
if rsMoveNodeDown.EOF then
    rsMoveNodeDown.Close
    Set rsMoveNodeDown = Nothing
end if
    rsMoveNodeDown("Parent") = iParent
    rsMoveNodeDown("Ordr") = iNode+1
    rsMoveNodeDown.Update

rsMoveNodeDown.MoveNext
    iNode = iNode-1
wend

  #2 (permalink)  
Old March 3rd, 2006, 08:41 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Location: , , Canada.
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Pay attention to your LockType

Try changing:
sMoveNodeDown.Open sSQL, objConn,2,2 ' adOpenKeyset CursorType
To:
sMoveNodeDown.Open sSQL, objConn, adOpenKeyset, adLockPessimistic ' adOpenKeyset CursorType


- A.Kahtava


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Recordset arholly Access VBA 16 December 27th, 2006 01:28 PM
Referencing a field from the current recordset PeterGonzales Access VBA 2 January 5th, 2006 01:45 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
How to set current recordset (rst.) gasma1975 Access 1 February 11th, 2005 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.