ZQuery update
Posted: 05.11.2008, 02:52
Hi,
I am using Zeos 6.6.4 with Firebird 2.1
I have a little bit confuse about how to use ZQuery with ZUpdateSQL. I used to put a ZQuery and ZUpdateSQL into the Form, and set ZQuery.UpdateObject to the ZUpdateSQL. Then set the Insert/Update/Modify/Delete/Refresh SQL under ZUpdateSQL component for updating data.
But I just find out ZQuery actually is not a read-only dataset. If my code like this without a ZUpdateQL:
It actually work! So my question is:
Do ZQuery equal to TQuery? Or something special I miss?
Cheers,
I am using Zeos 6.6.4 with Firebird 2.1
I have a little bit confuse about how to use ZQuery with ZUpdateSQL. I used to put a ZQuery and ZUpdateSQL into the Form, and set ZQuery.UpdateObject to the ZUpdateSQL. Then set the Insert/Update/Modify/Delete/Refresh SQL under ZUpdateSQL component for updating data.
But I just find out ZQuery actually is not a read-only dataset. If my code like this without a ZUpdateQL:
Code: Select all
While not ZQuery.Eof do
begin
ZQuery.Edit; // Note: no ZUpdateSQL Assign to UpdateObject property
ZQuery.FieldByName('Title').AsString = 'Test';
ZQuery.Post;
ZQuery.Next;
end;
Do ZQuery equal to TQuery? Or something special I miss?
Cheers,