Subject | Re: [IBO] Prepared and unprepared |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-06-30T08:03:27Z |
Hello Tim, I'm just adding a little bit to what Helen said (she said the
important bits, this is just details).
At 08:36 30.06.2003 +0200, you wrote:
check and commit when another task initiates (though I'm not saying this
neccessarily is wrong).
TIB_Transaction will be closed when calling commit.
prepare it.
does it automatically if you do not do it.
calling Open if dealing with a TIB_Query and First if a TIB_Cursor - I
never do both.
HTH,
Set
important bits, this is just details).
At 08:36 30.06.2003 +0200, you wrote:
> if not TIB_Transaction.InTransaction thenI'm used to commit a transaction when I've done what I want to do, not
> TIB_Transaction.Commit;
check and commit when another task initiates (though I'm not saying this
neccessarily is wrong).
> if active then close;Queries live within a transaction, so all queries within your
TIB_Transaction will be closed when calling commit.
> if not TIB_Transaction.InTransaction thenOK, but calling ParamByName will start the transaction (unless started) and
> TIB_Transaction.StartTransaction;
> ParamByName('Param_1').AsWhatever := Var_1
prepare it.
> if not prepared thenPrepare has to be done before using ParamByName. You've escaped since IBO
> Prepare;
does it automatically if you do not do it.
> Open; (or execSQL or whatever)I think calling Open will go to the first record anyway. Myself, I'm
> First;
calling Open if dealing with a TIB_Query and First if a TIB_Cursor - I
never do both.
HTH,
Set