Board index » delphi » TIBScript and Committing Transaction
|
Far
Delphi Developer |
TIBScript and Committing Transaction2006-08-17 02:06:35 AM delphi129 I have the following code: sc := TIBScript.Create(self); sc.Database := dm.db; sc.Transaction := dm.str; for I := 0 to saves.Count - 1 do begin ic := TIC(saves.Objects[i]); sc.Script.Add('Update Inventory Set UPCCODE = ''' + ic.UPCCode + ''' where KTLCODE = ''' + ic.KTLCode + ''' and KTLTYPE = ''' + ic.KTLType + ''';'); end; sc.Transaction.StartTransaction; sc.ExecuteScript; sc.Transaction.Commit; sc.Free; while produces and executes the following sql. Update Inventory Set UPCCODE = '084948333338' where KTLCODE = '5865001' and KTLTYPE = '10'; Update Inventory Set UPCCODE = '084948222229' where KTLCODE = '5865001' and KTLTYPE = '13'; After executing with no error the data is not committed until I close the program. (i.e.) attempts to read the changed data recall the original values. After closing and reopening the program I get the correct values. Any Ideas? The transaction.Params is set to: read_committed rec_version nowait write Delphi 2006 and Interbase Express 10.10 Farley |
