Re: Make a disconnected recordset editable
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 20:02:20 -0400
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"
.
- References:
- Make a disconnected recordset editable
- From: Barry Seymour
- Re: Make a disconnected recordset editable
- From: Bob Barrows [MVP]
- Re: Make a disconnected recordset editable
- From: Barry Seymour
- Make a disconnected recordset editable
- Prev by Date: Re: Make a disconnected recordset editable
- Previous by thread: Re: Make a disconnected recordset editable
- Index(es):
Relevant Pages
|
|