I'd like to know whether the TZQuery/TAConnection is capable to deal with the consecutive SQL statments and editing the database at the run time, that is :
ZQuery.Close;
ZQuery.SQL.Clear;
ZQuery.sql.add('select * from Table1');
ZQuery.Open;
ZQuery.FieldByName('First_Field').AsInteger := 5;
/// I do my stuff here with Table1 here
// I switch to another table
ZQuery.Close;
ZQuery.SQL.Clear;
ZQuery.sql.add('select * from Table2');
ZQuery.Open;
ZQuery.FieldByName('First_Field_of_Table2').AsInteger := 12;
Any changes made at the run time in the database as shown wiwth above code are not reflected in the DBGrid and remains intact. I played around with many properties of TZConnection and TZQuery Components(auto commit, readCommited etc..) to get records to be showed up in datagrid but it was futile struggle.
Interestingly Every changes made to the database are applied exactly as I want it because I monitor it from FlameRobin and everything is fine, so there is not problem actually with database but instead the problem is with Datasource & DBGRid doesn't reflect the current condition of database.