Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / June 2005



Tip: Looking for answers? Try searching our database.

Updating a hierarchical recordset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Griff - 29 Apr 2005 17:49 GMT
I have a hierarchical, static, disconnected  ADO recordset.

I attempt to update one of the fields in it:
--------------------------------------------------------------
   with oRS
           Set oUniqueRow = .Fields
   end with
......
' I attempt to update the field:
   oUniqueRow .Item("crossRefCatID").Value = 20

--------------------------------------------------------------
I get the error:
   Run-time error '-2147217887 (80040e21)
   Multiple-step operation generated errors.  Check each status value

Any ideas?

Thanks

Griff
Veign - 29 Apr 2005 18:03 GMT
INFO: Using Disconnected Hierarchical Recordsets:
http://support.microsoft.com/kb/q213856/

Read Part 1 and Part 2:
http://www.4guysfromrolla.com/webtech/060301-1.shtml

Signature

Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/

> I have a hierarchical, static, disconnected  ADO recordset.
>
[quoted text clipped - 17 lines]
>
> Griff
Griff - 29 Apr 2005 22:09 GMT
Okay - I think the problem is slightly different.

I know how to create a SHAPE command and retrieve data back from the
database.  I'm returning this to a DLL and processing the recordset entirely
within the DLL, not passing it to another process.

The problem is that when I attempt to CHANGE a field value within the
recordset (not UPDATE the underlying database) I get the error mentioned in
the original post.

A bit more info...

The field value that I'm attempting to alter exists in the TOP recordset
(presumably this shouldn't make a difference).

The field in question was originally created as a "place holder", i.e. by
saying "SELECT NULL AS PlaceHolder" and I'm now saying
.item("PlaceHolder").Value = ABC, causing the error.

Wits end on this one!

Thanks

Griff
Pásztor, Zoltán - 28 Jun 2005 15:26 GMT
> Okay - I think the problem is slightly different.
>
[quoted text clipped - 20 lines]
>
> Griff

I had run into something like this, although not for a hierarchical
recordset, just a plain one.

As far as I can remember, the problem was that the ADO provider reported the
field type of the constant NULL field as something special (don't remember
what), and this type wasn't liked by the rest of the program. My workaround
was changing

   SELECT NULL AS Placeholder

to

   SELECT '' AS Placeholder.

Just a thought ...

Signature

PZ

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.