Solved

.Update Method with ADO Recordsets

Posted on 2000-05-11
3
384 Views
Last Modified: 2013-11-25
Hello there,

I have a problem using the .Update method with and ADO recordset using
Oracle and VB 6.

I have a loop to go through each text box and assign each one to a field in the database.


Rs.Fields(val).value  = Text(i).text.
Rs.Update

if there is a numeric value I set it to NULL and string values I set to ""

This is fine with the first update but if I change the data and try to save
the record again using the .Update Method. I get the following error message from VB.


Err.Number = -2147217864
Err.Description = The specified row could not be located for updating.Some
values may have been changed since it was last read.

Could anyone explain what the cause of this error and any way to fix or go around it.

Thanks





0
Comment
Question by:DarrenD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2800686
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 50 total points
ID: 2800693
After the rs.update do a rs.Resynch
0
 
LVL 18

Author Comment

by:DarrenD
ID: 2800902
Works a like a charm...
 
Thanks Wsh2.

I thought that the .update method would do that for you. I never even new about the .Resync method.

Also thanks to AzraSound for giving an answer.

And it has to be said thanks for the quick response from both...

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question