Update inside UniQuery.Edit
Posted: Thu 29 May 2014 06:43
Hello,
How exactly works the update during edit ?
I have a PostgresSQL record like this (for example):
Table1 (P1 : string[30];
P2 : string[30];
P3 : string[30];
P4 : string[30];
Geom : Geometry (spatial WKT));
I use normal query loop
....
UniQuery.SQL.Add('SELECT * FROM Table1 WHERE ....);
UniQuery.First;
while not UniQuery.Eof do begin
UniQuery.Edit
UniQuery.FieldByName('P1').AsString:='abc';
UniQuery.FieldByName('P2').AsString:='xyz';
UniQuery.Next;
end;
...
I understand that the content of others fields are safe, especially the Geom ?
How do you know whether a field is changed ?
What will happen when before editing field P1='abc'?
Will be this field treated as changed ?
Thanks
Michal
How exactly works the update during edit ?
I have a PostgresSQL record like this (for example):
Table1 (P1 : string[30];
P2 : string[30];
P3 : string[30];
P4 : string[30];
Geom : Geometry (spatial WKT));
I use normal query loop
....
UniQuery.SQL.Add('SELECT * FROM Table1 WHERE ....);
UniQuery.First;
while not UniQuery.Eof do begin
UniQuery.Edit
UniQuery.FieldByName('P1').AsString:='abc';
UniQuery.FieldByName('P2').AsString:='xyz';
UniQuery.Next;
end;
...
I understand that the content of others fields are safe, especially the Geom ?
How do you know whether a field is changed ?
What will happen when before editing field P1='abc'?
Will be this field treated as changed ?
Thanks
Michal