Page 1 of 1

To control oracle connection through DataSource: possible?

Posted: Tue 10 Apr 2012 01:28
by dcoracle600pro
Hi,

We would like to disconnect from Oracle at some point in ASP.NET code.
Having OracleDataSource initiated a session:
Devart.Data.Oracle.Web.OracleDataSource SourceTableRowData = new Devart.Data.Oracle.Web.OracleDataSource();
SourceTableRowData.ConnectionString = "User Id=" + UserName + ";Password=" + Password + ";Server=" + ServerName + ";";
SourceTableRowData.SelectCommand = "select ....";
DataView dv = (DataView)SourceTableRowData.Select(new DataSourceSelectArguments());
....
how do we terminate session? Because the session remains open for indefinite time.
This does not work:
SourceTableRowData.Dispose();

Posted: Tue 10 Apr 2012 12:34
by Pinturiccio
Add the following record to your connection string:

Code: Select all

pooling=false;
When you turn off the pooling, a connection will be opened for performing a command and closed after the command execution is over.

Posted: Wed 11 Apr 2012 05:58
by dcoracle600pro
Thank you, it works!