Page 1 of 1

ZUpdateSQL1.DataSet.Modified

Posted: 28.01.2006, 01:04
by Josef Koller
Hi,

I have a problem with ZUpdateSQL1.DataSet.Modified.

The following construction:
I have a form with many dbedit's and for example a Button Save.
After onClick to save I would like to handle different situations like this:

if ZUpdateSQL1.DataSet.Modified = true then begin
.....
end else bgin
.....
end;

By testing the code the cursor goes ever in the else path ( the same if I change a dbedit on the form or not).

I tested it with zqArtikel.modified = true, too.
In this query I have the updateobject ZUpdateSQL1.

What's wrong?

How can I find out if a record is changed before I post the reord?

Many thanks.

Kind regards

Josef

Posted: 31.01.2006, 14:03
by gto
The modified property comes from TDataSet in DB.pas
I dunno if it will work with zeos

Sometime ago I did almost the same thing, but it was not in a database project
I used a MD5 sum of the data :D
When needed, the program compares the old sum with the actual data, and everithing works !