Subject | Re: [IBO] Prepared and unprepared |
---|---|
Author | Helen Borrie |
Post date | 2003-06-30T10:36:31Z |
At 12:24 PM 30/06/2003 +0200, you wrote:
be Active.
If you change the parameter values then you need a fresh set. Just call
Refresh after assigning the new params values. IBO will take care of the
InvalidateRows call and will fetch any required rows that aren't in the buffer.
have already refreshed themselves before this.
>Thanks Helen.Not this line. Nothing will happen here if the dataset happens to
>
>I had been taught to close all the data access objects when I am finished
>with them, but your advice seems different.
>
>Is this true of all IB data access objects? I mean, for insert, update,
>delete, and select transactions could I do the following :
>
> Screen.Cursor := crSQLWait;
> Screen.ActiveCustomForm.Refresh;
> try
> try
> begin
> with IBQry_GetBatchData do
> begin
> if not IB_Transaction.InTransaction then
> IB_Transaction.StartTransaction;
>
> ParamByName('BATCHNUM').AsInteger := Batch;
> ParamByName('TERMID').AsString := TermID;
>
> if not Active then Open else Refresh;
be Active.
If you change the parameter values then you need a fresh set. Just call
Refresh after assigning the new params values. IBO will take care of the
InvalidateRows call and will fetch any required rows that aren't in the buffer.
> end;Not sure what this would do. The controls linked to the dataset will
> end;
> except
> on E : Exception do
> begin
> IBdmMain.HandleException('XYZ');
> raise;
> end;
> end;
> finally
> begin
> Screen.Cursor := crDefault;
> Screen.ActiveCustomForm.Refresh;
have already refreshed themselves before this.
> end;Helen
> end;