Hello, Lazarus: SVN a week ago. fpc: 2.2.3, 2.2.4 Database: Firebird 1.5 and 2.1
Does anybody known a reason why this code will crash: SQLQuery1.Delete; SQLQuery1.ApplyUpdates; SQLTransaction1.CommitRetaining; SQLQuery1.Next; SQLQuery1.Delete; SQLQuery1.ApplyUpdates; SQLTransaction1.CommitRetaining; The crash happends in the second ApplyUpdates. This is a simplified copy of the original code which crashes when trying to delete a second record in a dbgrid, no matter the order or the position of both deleted records. This code was working fine in 2.2.2 fpc version but no more using fcp 2.2.3 or 2.2.4. The error is quite strange: ----------------------------------------- IBConnection1: PrepareStatement -Dynamic SQL error -SQL Error code = @1 -Token unknown - line @1, column @2 -...@1 ----------------------------------------- Maybe I must use a different approach to get the same result which is basically delete records in a dbgrid. Note that the SQLQuery1 has a SQLDelete statement which is: DELETE from TABLE where IDTAG=:IDTAG The code works fine if I use commit instead CommitRetaining but in that case I lost the current position in the dbgrid and I must re fetch all data from database. Any hint ? Thank you. -- Best regards, JoshyFun -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
