Subject | Re: [IBO] Prepare before Open |
---|---|
Author | Helen Borrie |
Post date | 2005-02-11T23:56:10Z |
At 10:49 PM 11/02/2005 +0000, you wrote:
handler to refer to parameters or fields, you should include a test of
Prepared to avoid an AV.
if not YourStatement.Prepared then YourStatement.Prepare;
IB_Dataset descendants always do this test. Under some conditions, IB_DSQL
doesn't. Personally, I think it does no harm at all to do it every
time. Why look for opportunities to crash your apps?
Whatever, always do the test when calling Prepare yourself.
Helen
>What is the downfall of not calling Prepare before Open?It depends on the sequence of events. If you are using a BeforeOpen
handler to refer to parameters or fields, you should include a test of
Prepared to avoid an AV.
if not YourStatement.Prepared then YourStatement.Prepare;
IB_Dataset descendants always do this test. Under some conditions, IB_DSQL
doesn't. Personally, I think it does no harm at all to do it every
time. Why look for opportunities to crash your apps?
Whatever, always do the test when calling Prepare yourself.
Helen