Subject | RE: [firebird-support] FB, Delphi 7, IB components and transactions |
---|---|
Author | Diego Barros |
Post date | 2005-01-13T22:31:06Z |
On Friday, January 14, 2005, at 09:11AM, Alan McDonald <alan@...> wrote:
Sorry for not being clear. What I meant was, if I execute something like this:
// this insert a new record and it succeeds. i.e. no exception or errors
IBQuery1.ExecSQL;
Subsequent to the ExecSQL call other code is executed, let say print a report, anything. What I was getting at was that if an exception happens anytime after a successful insert (the ExecSQL call), and the application dies, then that record is still in the database? Just because when I run two applications, and one can't see the changes of the other, doesn't mean that if one crashed, that the insert did not success, and the new record will not be there when the dead application is re-run? Maybe I'm not making sense and I'm confusing myself now. :)
Cheers,
Diego
>> Hi Alan,Hi Alan,
>>
>> Thanks for the reply.
>>
>> Even still, if I don't commit it, and the application crashes at
>> any stage after doing an ExecSQL to insert a new record, that
>> record will be there when I re-run the application after a crash?
>> It doesn't mean the record is not inserted in to the database?
>>
>> BTW this is a single user application.
>>
>> Cheers,
>> Diego
>
>Firstly, there's something very wrong if your app crashes when you insert.
>We need to know more about exactly what you are doing to help your there.
>Secondly, if the app crashes on insert (i.e. no commit has taken place) then
>the record will not be visible when you start up again unless you are
>autocommiting your query. This is not recommended now that you are away from
>the bde. So I suggest you start building your test app again from scratch
>and don't change the defaults for the moment.
>Alan
Sorry for not being clear. What I meant was, if I execute something like this:
// this insert a new record and it succeeds. i.e. no exception or errors
IBQuery1.ExecSQL;
Subsequent to the ExecSQL call other code is executed, let say print a report, anything. What I was getting at was that if an exception happens anytime after a successful insert (the ExecSQL call), and the application dies, then that record is still in the database? Just because when I run two applications, and one can't see the changes of the other, doesn't mean that if one crashed, that the insert did not success, and the new record will not be there when the dead application is re-run? Maybe I'm not making sense and I'm confusing myself now. :)
Cheers,
Diego