Refresh Dataset with SQLDB and Firebird lazarus / 16-Databases ---------------------------------------------------------------------- jwest · 2016-03-19 03:11 Does someone can post a sample about How to do a Refresh with TSQLQuery and SQLDB with Firebird? Here is my pseudo code: var DB:TIBConnection; Tn:TSQLTransacttion; Qry:TSqlQuery; DB:=TIBConnection.Create; //set params of DB Tn:=TSQLTransacttion.Create; Tn.Database:=DB; Qry:=TSqlQuery.Create; Qry.Database:=DB; Qry.Transactio:=Tn; Qry.Sql.Text:='Select * from tableX'; Qry.Open; //Insert or update TabelX in another station, and Commit; Qry.Refresh; //No refresh is done here But, if commit the transaction and I close and reopen the Qry, I have the dataset refreshed. How I do a Refresh without Commit TN, Close e Reopen Qry?? How  Refresh method works? ---------------------------------------------------------------------- mangakissa · 2016-03-19 08:16 try this with the params of your transaction: read_committed rec_version nowait ---------------------------------------------------------------------- jwest · 2016-03-19 14:35 Sorry , but it doesn't work. No refresh is done with this settings. ---------------------------------------------------------------------- balazsszekely · 2016-03-19 15:24 Quote@jwest //Insert or update TabelX in another station, and Commit;What do you mean by "another station"? The table is updated with a different connection? If you update the table with the same connection, after a post, which is a logical transaction, you should see the changes without refresh. To permanently save the data to the database use the commit/commitretaining methods. If the changes was done in the context of separate connection, then you need a refresh. You will be able to see the changes only after the other connection commited the data. Ps: Of course, all this depends on the isolation level(usually "Read committed"). ---------------------------------------------------------------------- jwest · 2016-03-19 15:28 Yes, It was updated with a different app and connection. I just solved when I added "isc_tpb_read_commited" in transaction params instead of  "read_commited". Thank you. ---------------------------------------------------------------------- rvk · 2016-03-19 18:51 Quote from: jwest on March 19, 2016, 04:28:43 pmI just solved when I added "isc_tpb_read_commited" in transaction params instead of  "read_commited". I think you mean "isc_tpb_read_committed". Notice the double T. "isc_tpb_read_commited" shouldn't do anything. Yeah, typos like that really make finding these problems difficult. In Delphi IBX you can just add "read_committed" because that component puts the prefix "isc_tpb_" in front of it. So it depends on each component what exactly you need to provide to set the TPB parameter. But normally nowadays the components need the complete name (with isc_tpd_ prefix). For instance... http://www.devrace.com/en/fibplus/articles/479.php http://www.devrace.com/en/fibplus/articles/3292.php