Subject | Re: [firebird-support] Understanding Sweep |
---|---|
Author | Erick Sasse |
Post date | 2007-10-24T11:41:41Z |
Helen,
I'm familiar with TSQLConnection and its methods to handle
transactions, but I don't see how should you it when populating a
ClientDataset. To populate a ClientDataset I just "open" it. Then
Delphi (dbexpress or whatever) opens the database connection (if it's
not already open) fetches the data and populate my ClientDataset. Are
you telling me that I should hook some code in the middle of this
process to proper handle transactions?
Maybe if I set KeepConnection to False in TSQLConnection and let it
drop the connection when there is no datasets active, could help? I
just worry about the speed penalty for connecting and disconnecting
all the time.
Thanks.
--
Erick Sasse
2007/10/24, Helen Borrie <helebor@...>:
I'm familiar with TSQLConnection and its methods to handle
transactions, but I don't see how should you it when populating a
ClientDataset. To populate a ClientDataset I just "open" it. Then
Delphi (dbexpress or whatever) opens the database connection (if it's
not already open) fetches the data and populate my ClientDataset. Are
you telling me that I should hook some code in the middle of this
process to proper handle transactions?
Maybe if I set KeepConnection to False in TSQLConnection and let it
drop the connection when there is no datasets active, could help? I
just worry about the speed penalty for connecting and disconnecting
all the time.
Thanks.
--
Erick Sasse
2007/10/24, Helen Borrie <helebor@...>:
> At 12:10 PM 24/10/2007, you wrote:
> >Helen,
> >
> >I've never heard about controlling transactions manually when
> >populating a ClientDataset. I have no idea how to do it. :) dbExpress
> >always handled this for me.
> >
> >What should I do?
>
> Read the help for TSQLConnection? (StartTransaction and Commit methods, et al.) Read the (copious) documentation in the Delphi manual for DBX which does seem to be somewhat pitched at MySQL (which doesn't have transactions, natch!)
>
> Your gstat figures are consistent with an app that starts lots of transactions automatically, that never get committed. AFAIK, dbXpress (like other Delphi connectivity component suites) will start a transaction if one is not started but won't take care of committing any transaction.
>
> Firebird itself will eventually commit transactions left hanging from lost connections but, going by info you have provided so far, your SQLConnection is not being abandoned, just neglected...(just guessing....)
>
> ./heLen
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>