Subject RE: [IBO] Big Batch...
Author Claudio Valderrama C.
The basic steps are:
- Use a TIB_DSQL and write the parameterized SQL once.
- Prepare it.
- Get a reference to your parameters in temp vars. Faster than using
ParamByName. This is only important in a loop like the yours, not in a
single param assignment.
- Call BeginBusy or another function that will stop the cursor's image from
being changed according to the component's state (so less CPU cycles are
wasted in the GUI).
- Start a transaction.
- Do your loop by reading your input values, assigning them to parameters
and calling Execute.
- Commit the transaction.
- Call EndBusy.
- Unprepare the TIB_DSQL if you aren't going to use it again.
- Protect the relevant code with try-finally (for EndBusy and Commit) or
include also try-except (just in case you want to Rollback if your insertion
loop raises an exception instead of forcing a Commit in the finally part).

Trying to coerce a C/S engine to behave like a weak file-based, desktop
database is a very important source of frustration.

C.

> -----Original Message-----
> From: Admin [mailto:dkeith@...]
> Sent: Viernes 16 de Marzo de 2001 23:03
>
> Luiz -
>
> I looked in the code explorer under classes and procedures(there
> weren't any) and in the help system for beginbusy and endbusy, but
> couldn't find any references. Where are those procedures referenced or
> documented?