Solved

.Update Method with ADO Recordsets

Posted on 2000-05-11
3
379 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help in WHSCRIPT 9 47
using web browser with BING 40 110
clicking a shape in a frame array vb6 3 40
MsgBox 4 46
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now