Re: Make a disconnected recordset editable
- From: "Barry Seymour" <bseymour@xxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 14:57:22 -0700
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.
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
5. Load XML into the recordset
4. Try to update a field in a row. I get this error:
Error -2147217887: Multiple-step operation generated errors. Check each
status value.
Maybe step 1 is where I should look? I'm thinking the original recordset
must be updatable before I do anything else.
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:%23Eg1nHkqIHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
1. Did you use the adLockBatchOptimistic locktype?
2. Could the recordset be edited before you saved it to xml?
Barry Seymour wrote:
Many thanks to Bob Barrows for help on my first problem ( see XML to
ADO Recordset and Back Again). Now here's another.
I am trying to create a disconnected, editable recordset from a stored
procedure call in VB6. I've Googled all the relevant code but I can't
get anything
that will let me *edit* the recordset. I always get an error saying
the recordset cannot be edited:
Here are my steps:
1. Use ADO command to get a stored procedure.
2. Convert to an XML document
3. When needed, create a new ADO Recordset, load XML into it
4. Try to insert/update/delete a row. I get this error:
Run-time error '3251':
Current Recordset does not support updating. This may be a
limitation of the provider, or of the selected locktype.
The recordset comes from a stored procedure, not a table. I fetch it
by way of an ADO command object. Are these indicators to ADO that the
recordset should be read-only?
I want to be able to edit the local recordset in order to avoid
repeated trips to the database for updated data.
Any help or pointers would be appreciated. Thanks in advance.
Barry
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Follow-Ups:
- Re: Make a disconnected recordset editable
- From: Bob Barrows [MVP]
- Re: Make a disconnected recordset editable
- References:
- Make a disconnected recordset editable
- From: Barry Seymour
- Re: Make a disconnected recordset editable
- From: Bob Barrows [MVP]
- Make a disconnected recordset editable
- Prev by Date: Re: Make a disconnected recordset editable
- Next by Date: Re: Make a disconnected recordset editable
- Previous by thread: Re: Make a disconnected recordset editable
- Next by thread: Re: Make a disconnected recordset editable
- Index(es):
Relevant Pages
|
|