Subject | Re: [IBO] coding question |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-02-05T02:36:37Z |
At 06:34 PM 04-02-02 -0800, you wrote:
At its simplest....
try
IBOtable.post
except
on E:EIBO_ISCError do
begin
showmessage('error commiting '); // E:Message would give you the ISC error text
MyIBODatabase.RollBack;
end
end
Of course, you will probably want to do more than this to find the offending error and offer a solution to the user. Use a TIB_SessionProps and have your application access the properties of its error event to identify the actual error and handle it accordingly. (Look up the doc for TIB_SessionProps to see what's available).
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com
>Hi all,Daniel,
>I read everything I could find on transactions, what if I use the default
>transaction from IBOdatabase and autocommit is true how should I recover
>from a messed up commit?
>try
> IBOtable.post
>except
> showmessage('error commiting ');
>end
>
>how can I recover from this, rollback and start again?
At its simplest....
try
IBOtable.post
except
on E:EIBO_ISCError do
begin
showmessage('error commiting '); // E:Message would give you the ISC error text
MyIBODatabase.RollBack;
end
end
Of course, you will probably want to do more than this to find the offending error and offer a solution to the user. Use a TIB_SessionProps and have your application access the properties of its error event to identify the actual error and handle it accordingly. (Look up the doc for TIB_SessionProps to see what's available).
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com