> By the way, I write the data using the following code in the event "after > post": > begin > SQLQuery1.ApplyUpdates; > SQLTransaction1.Commit; //In this moment, after commit, the query is > closed !!!? > SQLQuery1.active:=true; //So, I have open it !!!? This does to > return for the first record !!! How to keep the current register? > end;
You're the first ont noticing this, and I'm really suprised that no-one else did that before. For me this is one (the) main reason why it isn't useable in real-life applications (yet) You should use CommitRetaining instead. With this function the transaction is comitted, but not closed. But only Firebird supports this feature. > Is correct the code? The problem is that the query is closed. So I have > that to open again and the pointer goes for the first record. I used the > bookmark, but, not work. How to keep the pointer on the current register? Do > you know? You should keep the select-transaction and commit-transaction seperate. So do the update-queries in another transaction then the select-queries. For that a property must be added to TSQLQuery with the 'UpdateTransaction'. I think that with that option this problem can be solved. -- Met vriendelijke groeten, Joost van der Sluis CNOC Informatiesystemen en Netwerken http://www.cnoc.nl _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
