Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List rows affected when updating database or dataset

Status
Not open for further replies.

Vandy02

Programmer
Jan 7, 2003
151
0
0
US
I am updating a DB with local data from dataset now("EMP").
How can I show the rows affected as in the EMPNO's of which is a column(EMPNO) in both dataset now("EMP") and table EMP within db.

Also, is it possible to show the new or updated rows from a db when it is coming over to the local dataset where changes are made on the DB end?

Thanks
 
Hi,

Your first question is a little hard to understand. Do you want to show which rows are different in the dataset compared to the values in the database?

By the sounds of your second question, you have a read only grid or something so when a record is changed in the database you want it to show in the displaying of the records? am I on the right track?
 
=======================================================
First Question - Yes - exactly what you said..
more or less it would show in a list box or something the records modified due to the dataset changes

ie.

Updating records in table A....
WO984934..
WO839483...
WO849384...
etc..

======================================================
Second Question - Once again you are on the money..
Basically..let us say I am pulling over records from a table...when they are being pulled over i would like to have them show up in a list or grid during the process..like the previous question would almost be like a list box, label, or grid showing the progress of the load

ie

Pulling records from table A....
WO28391...
WO84928...
WO98930..
etc...

=======================================================

I hope this makes since?

Thanks
 
Code:
dim d as dataset
d.Tables(0).GetChanges()

this will give you the records that have changed since the last fill operation.

Your second question will need a loop if that is what you really want. But it will slow down the process.


Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top