> I'm doing my first project with IBExpress components, and have come across
a
> strange behaviour that I'm hoping someone here can explain.
>
> I have a TDBGrid on the main form which is connected to a TIBTable. The
> TIBTable is connected to a TIBDatabase (of course) and to a TDatasource
> which is linked to the TDBGrid.
>
> The Table and Database components each have their own TIBTransaction
> component (Transaction4Table and Transaction4DB).
>
> My problem is that whenever I Post a change to the Table and call
> Transaction4Table.Commit, the DBGrid goes blank as if the Table has been
> closed.
If you debug it, it _has_ been closed (active = false) :)
> Is this normal ? Have I missed something ? And how should I recode to make
> the records in the DBGrid visible again ?
I get the same result, here are some thoughts:
1. when you post changes to the transaction, the results in the table
immediatly become invalid ('cos you have changed them), so making the
table.active = false kinda makes sense.
2. Dont use TxxTables against a SQL database. Ever. I'd recommend using a
TIBQuery and a TIBUpdateSQL. Works for me.
3. Only use 1 transaction per database, unlesss a) you _need_ more than one
or b) you have multiple threads running, eg in a MIDAS server (then its one
per TIBQuery)
4. Strange behavior with IBX is not uncommon. Just ask TonyB :)
5. Make sure you have the transaction isolation set correctly, which I
beleive is "read committed" (please, someone, correct me if I'm wrong!!!).
HTH a little.
N
--
Nic Wise - 021.676.418 / [EMAIL PROTECTED]
Is it not a foolish man, said little Woo, who keeps all his chickens in his
trousers?
For at best, will he not suffocate his chickens, and, and worst, will he not
disappoint the ladies in the village? --Alexi Sayle
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz