Hello,
I need to know if a new created OracleConnection Object is when opend from pool or a newly established Db-Connection. After a connection is established we need to start some database commands. I tried the Initialization Command property but it seems that this is always executed when the connection object state is opened. I need a command that is only executed once at the first time a db connection is established.
Thank you very much,
Tobsel
Check if new connection is from pool or new
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Check if new connection is from pool or new
Initialization Command is executed each time the connection is opened regardless of whether a new connection is actually created or an existing connection is taken from the pool. We will investigate the possibility of implementing a initialization command that is executed only if a new session is created when the connection is opened, but we can't tell any timeframe at the moment.
Re: Check if new connection is from pool or new
The Run Once Command connection string parameter, which specifies a command or several commands to execute when the connection is opened the first time and not executed when the connection is taken from the pool, is added in the newest (9.0) version of dotConnect for Oracle: http://forums.devart.com/viewtopic.php?f=1&t=33571.