To control oracle connection through DataSource: possible?

To control oracle connection through DataSource: possible?

Postby dcoracle600pro » Tue 10 Apr 2012 01:28

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();
dcoracle600pro
 
Posts: 43
Joined: Mon 09 Apr 2012 09:57

Postby Pinturiccio » Tue 10 Apr 2012 12:34

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.
Pinturiccio
Devart Team
 
Posts: 1982
Joined: Wed 02 Nov 2011 09:44

Postby dcoracle600pro » Wed 11 Apr 2012 05:58

Thank you, it works!
dcoracle600pro
 
Posts: 43
Joined: Mon 09 Apr 2012 09:57


Return to dotConnect for Oracle