To control oracle connection through DataSource: possible?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dcoracle600pro
Posts: 51
Joined: Mon 09 Apr 2012 09:57

To control oracle connection through DataSource: possible?

Post by 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();

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by 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.

dcoracle600pro
Posts: 51
Joined: Mon 09 Apr 2012 09:57

Post by dcoracle600pro » Wed 11 Apr 2012 05:58

Thank you, it works!

Post Reply