Good day.
I am new to Intraweb develoment.
I see there is a pooling option avaiable when creating a new Intraweb projects,
but it does seem to implement a bit more coding to implement pooling option.
Is it possible to rather use the Pooling option in SDAC instead (and leave Intraweb pooling unchecked)?
Thanks you
Intraweb Pool
Re: Intraweb Pool
You can't use the TMSConnection.Pooling property instead of Pool Data Connections option of IntraWeb applications. This property enables/disables connection pooling to SQL Server in the SDAC: https://www.devart.com/sdac/docs/?devar ... ooling.htm
-
- Posts: 10
- Joined: Wed 20 Apr 2016 21:12
Re: Intraweb Pool
Hi
After a bit more experience and working in IW I am revisitng this topic. I think sdac pooling option should work seeing that IW will create a seperate thread for each datamodule that contain a tmsconnection.
If tmsconnection is connected with unique value for each connection (ny added "Applicaiton Name="+ "WebApplication.AppID" to connectstring). I am trying to minimize the number of open connections to the database, so i clsoe connection after query on page in done. Is above logic correct?
My question is this. Should I use Disconnected mode or manually disconnect after wach query,
and is there a penalty in setting the maxpool size to high. thank you
Wihan
After a bit more experience and working in IW I am revisitng this topic. I think sdac pooling option should work seeing that IW will create a seperate thread for each datamodule that contain a tmsconnection.
If tmsconnection is connected with unique value for each connection (ny added "Applicaiton Name="+ "WebApplication.AppID" to connectstring). I am trying to minimize the number of open connections to the database, so i clsoe connection after query on page in done. Is above logic correct?
My question is this. Should I use Disconnected mode or manually disconnect after wach query,
and is there a penalty in setting the maxpool size to high. thank you
Wihan
Re: Intraweb Pool
Connection Pooling in SDAC.
When using pooling if you call the TMSConnection.Close method, the connection will not be closed, but will be moved into pool for the number of milliseconds specified in TMSConnection.PoolingOptions.ConnectionLifetime. After this time the connection will be closed and removed from the pool if any other TMSConnection does not use it.
When opening a new connection, pool will be checked the first. If a connection with the same connection parameters (including the Application Name option) is found, it will be returned from the pool. Otherwise a new connection will be created.
Connection Pooling + Disconnected Mode in SDAC.
If a connection is in Disconnected Mode, then after SELECT query execution and all data fetching to the client side, the connection is placed into pool. The TMSConnection.Connected property becomes False, but TMSQuery dataset will remain open and you will be able to edit the data offline, for example using TDBGrid.
If in the described task you are not using offline data editing, then to minimize open connections to SQL Server, it is enough to call the TMSConnection.Close method after SQL queries execution.
Learn more about Disconnected mode in our online documentation: http://www.devart.com/sdac/docs/index.h ... ctmode.htm
When using pooling if you call the TMSConnection.Close method, the connection will not be closed, but will be moved into pool for the number of milliseconds specified in TMSConnection.PoolingOptions.ConnectionLifetime. After this time the connection will be closed and removed from the pool if any other TMSConnection does not use it.
When opening a new connection, pool will be checked the first. If a connection with the same connection parameters (including the Application Name option) is found, it will be returned from the pool. Otherwise a new connection will be created.
Connection Pooling + Disconnected Mode in SDAC.
If a connection is in Disconnected Mode, then after SELECT query execution and all data fetching to the client side, the connection is placed into pool. The TMSConnection.Connected property becomes False, but TMSQuery dataset will remain open and you will be able to edit the data offline, for example using TDBGrid.
If in the described task you are not using offline data editing, then to minimize open connections to SQL Server, it is enough to call the TMSConnection.Close method after SQL queries execution.
Learn more about Disconnected mode in our online documentation: http://www.devart.com/sdac/docs/index.h ... ctmode.htm