Solved

.Update Method with ADO Recordsets

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

758 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

17 Experts available now in Live!

Get 1:1 Help Now