Shaped Recordset and Updatebatch - VB6 & ADO & SQL Server 2000

From: Bass Pro (Pro_at_discussions.microsoft.com)
Date: 07/27/04


Date: Tue, 27 Jul 2004 09:53:58 -0700

I have a simple shaped recordset that is being updated. The properties are:
locktype= optimisticbatch
cursorlocation=client
cursortype=static

The problem is after the first update, which works fine, a second attempt fails on the same record. I checked and found the locktype had changed to READ-ONLY. What is causing it to change?

I watched the events in SQL Profiler and all looked normal on the first update. There is no indication of errors. Only the second invocation of updatebatch fails and the recordset is not updated.

Pls help, Thanks.



Relevant Pages

  • Re: LockTyp ADO RecordSet von Command
    ... Recordset.LockType den Wert adLockOptimistic zuweist. ... Habe ich die Möglichkeit den LockType zu modifizieren? ... RecordSet anzugeben? ... Dim Cnn as ADODB.Connection ...
    (microsoft.public.de.vb.datenbank)
  • Datensatz aktualisieren dauert zu lange
    ... ich so erstelle folgendes Recordset in einer VB-Appl. ... ' .LockType = adLockOptimistic ... ich und stelle es in eine Liste. ... optischen Hervorhebung versehen, ...
    (microsoft.public.de.vb.datenbank)
  • Thanks Re: Cant write to recordset
    ... [some of the mystification in the code snippet was because it 'really' uses ... > Here is the reason your recordset is readonly. ... > You set the LockType parameter to adCmdText which is equivalent to setting ... > sql statement to prevent it from returning any records). ...
    (microsoft.public.inetserver.asp.db)
  • Re: Problem deleting some records
    ... Is you LockType still Optimistic after recordset was opened. ... provider's capabilities and other cursor settings, ... by provider, when it tries to open cursor. ...
    (microsoft.public.vb.database.ado)
  • LockType und CursorType bei RecordSet von Command.Execute einstellen
    ... ADODB.Command Objekts erzuegt wurde. ... Es scheint ja so zu sein, das ein Recordset, wenn es vom ... Command.Executeerzeugt wurde den LockType = adLockReadOnly und den ... CursorType = adOpenStatic eingestellt hat. ...
    (microsoft.public.de.vb.datenbank)