Solved

.Update Method with ADO Recordsets

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

809 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