Re: Make a disconnected recordset editable



Barry Seymour wrote:
Dang, I thought I deleted this from my outbox before it went out. Oh
well, let me update this and answer your questions.

I added LockBatchOptimistic and got to where I could delete a row.
Then I tried to edit a field or add a field. no go. Here's what I get:

Error -2147217887: Multiple-step operation generated errors. Check
each status value.

The recordset was NOT updatable when I first fetched it. It comes
from a stored procedure and is read only.

That's the problem. It has to be updatable when you first open it. It will
be if you open it as a client-side batch-updatable cursor.


Here are my steps:
1. Use ADO command to run a stored procedure and get a read-only
Recordset.
2. Convert Recordset to an XML document
3. When needed, create a *new* ADO Recordset...
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockBatchOptimistic

These settings are overriden by the settings of the saved recordset. When
you open a recordset from persisted xml, you get a new recordset.

Maybe step 1 is where I should look? I'm thinking the original
recordset must be updatable before I do anything else.


Exactly.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: Gebundene Controls aus ADO-Recordset aktualisieren
    ... Engpass ist vor allem das LAN und der Server selbst. ... ob man mit einem SQL-Server oder der Jet-Engine ... Cursor und statischen Recordsets, egal welches Datenbanksystem ... dass eine Bewegung im Recordset eben auch ...
    (microsoft.public.de.vb.datenbank)
  • Re: Gebundene Controls aus ADO-Recordset aktualisieren
    ... Wozu ein serverseitiger Cursor? ... Ich kann also z.B. bei adOpenKeyset im Programmcode ... CursorLocation adUseServer bei Access sinnlos, ... wenn Du in Deinem Recordset zu einem anderen ...
    (microsoft.public.de.vb.datenbank)
  • Re: Suche mit SEEK
    ... ein Recordset mit serverseitigem Cursor ... Das heisst also es muss ein Recordset mit serverseitigem Cursor ... clientseitigem Cursor arbeiten und die Suche nach einem bestimmten Datensatz ...
    (microsoft.public.de.vb.datenbank)
  • Re: How to summarize recordset...Select Distinct alternative?
    ... functionality to store a set of paired values ... then the recordset is copied into local ... ADO provides a Cursor Library that provides the cursor ... reconnected to the database simply by setting the ActiveConnection to an ...
    (microsoft.public.data.ado)
  • Re: CursorType, LockType von ADO-Recordsets
    ... Use the CursorType property to specify the type of cursor that should be used when opening the Recordset object. ... If an unsupported value is set, then no error will result; the closest supported CursorType will be used instead. ...
    (microsoft.public.de.access.clientserver)