Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-01

Database connection manager

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello List,

I'm looking for a database connection manager that allow me to manage any open query connection.
What does it mean ?

Well lets say I have two forms that can open the same query that is located in a DataModule, now I want to close the connection only when the last form that asked to open it is closed, instead of closing it in each form, a manager will know what opened it, and how many requests to close it, and only when the last request has arrived, it will close the connection.

Is there anything existed for it today, or should I create one (and post it here as a new class) ?

Thanks,
Ido

http://ik.homelinux.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100118/ba83f810/attachment.html>

Reply by email

JoshyFun
to ik

Hello Lazarus-List,

Monday, January 18, 2010, 10:11:05 AM, you wrote:

i> Well lets say I have two forms that can open the same query that is located i> in a DataModule, now I want to close the connection only when the last form i> that asked to open it is closed, instead of closing it in each form, a i> manager will know what opened it, and how many requests to close it, and i> only when the last request has arrived, it will close the connection. i> Is there anything existed for it today, or should I create one (and post it i> here as a new class) ?

I do not know if it is implemented in Lazarus connections, but if you put "KeepConnected" to false in the connection control, when no control needs the connection it should be closed. So if you close all forms that uses queries the connection should be closed, but keep in mind that if you leave a query, in the module, open the connection will not be closed.

Best regards, JoshyFun

Reply by email