IBConnection1.Connected:=FALSE; IBConnection1.Connected:=TRUE; lazarus / 16-Databases ---------------------------------------------------------------------- Fortuna1 · 2012-05-19 12:58 I have     IBConnection1 and         SQLTransaction1   and SQLTransaction2              SQLTransaction1  with SQLTransaction1                SQLQuery2 with SQLTransaction2  SQLQuery1.Close;                   SQLQuery1.SQL.Text := 'select * from table sample  )   ';  SQLQuery1.Open;   SQLQuery1.Append;  SQLQuery1.FieldByName('keykey').AsInteger:=999;  SQLQuery1.Post;  SQLQuery1.ApplyUpdates; SQLTransaction1.Commit;   SQLQuery2.Close;                   SQLQuery2.SQL.Text := 'select keykey from table sample  )   ';  SQLQuery2.Open;      FieldByName('keykey'). Value is  9999;   SQLQuery1.Close; SQLQuery1.SQL.Text:='UPDATE la_prevzemg  SET keykey=1111  '; SQLQuery1.ExecSQL;  SQLTransaction1.Commit;  SQLQuery2.Close;                   SQLQuery2.SQL.Text := 'select keykey from table sample  )   ';  SQLQuery2.Open;   FieldByName('keykey'). Value is  9999;    SQLQuery1.Close;                   SQLQuery1.SQL.Text := 'select keykey from table sample  )   ';  SQLQuery1.Open;   FieldByName('keykey'). Value is  1111; IBConnection1.Connected:=FALSE;  IBConnection1.Connected:=TRUE;  SQLQuery1.Close;                   SQLQuery1.SQL.Text := 'select keykey from table sample  )   ';  SQLQuery1.Open;   FieldByName('keykey'). Value is  1111;  SQLQuery2Close;                   SQLQuery2.SQL.Text := 'select keykey from table sample  )   ';  SQLQuery2.Open;   FieldByName('keykey'). Value is  1111; Is NORMAL that you must  IBConnection1.Connected:=FALSE;  IBConnection1.Connected:=TRUE; I you wish   get the last data in  the database. and ONLY  select isn't enough ? ---------------------------------------------------------------------- ludob · 2012-05-19 13:43 QuoteIs NORMAL that you must  IBConnection1.Connected:=FALSE;  IBConnection1.Connected:=TRUE; I you wish   get the last data in  the database. and ONLY  select isn't enough ?Depends on the isolation level. Your first SQLQuery2.Open starts implicitly a transaction that you never ended. IBConnection:=false will rollback that transaction and your next SQLQuery2.Open starts a new one. Looks like you are using something like a repeatable read for SQLTransaction2 ---------------------------------------------------------------------- Fortuna1 · 2012-05-20 05:58 thank you had are right. at once pieces added  SQLTransaction1.EndTransaction;  SQLTransaction2.EndTransaction; it wasn't problem any more.