Connection Pooling
Posted: Fri 27 Apr 2007 12:51
Hello support,
I have read some issues regarding connection pooling, but I don't understand the way of pooling.
I have have datamodules with several TMyQuery and TMyTable component.
Now my app starts and first all datamodules open the queries and tables. (It takes some time)
Now I want to start/open all the datasets in a thread. So each datamodule in one thread.
Right now I have one component TMyConnection and set the pooling option to true.
Then I read that I have to create for each thread an instance of TMyConnection with same parameters.
So what does it mean?
and after all datasets are open I can delete the connection?
I found TMyConnectionPoolManager but there are only 2 methods in and I thought that I have to add the connection to the poolmanager which takes care of the connection.
thanks for your help!
Thomas
I have read some issues regarding connection pooling, but I don't understand the way of pooling.
I have have datamodules with several TMyQuery and TMyTable component.
Now my app starts and first all datamodules open the queries and tables. (It takes some time)
Now I want to start/open all the datasets in a thread. So each datamodule in one thread.
Right now I have one component TMyConnection and set the pooling option to true.
Then I read that I have to create for each thread an instance of TMyConnection with same parameters.
So what does it mean?
Code: Select all
TMyConnection* con = new TMyConnection();
con->Server = MainCon->Server;
con->UserName = MainCon->UserName;
....
con->Connected = true;
I found TMyConnectionPoolManager but there are only 2 methods in and I thought that I have to add the connection to the poolmanager which takes care of the connection.
thanks for your help!
Thomas