Recieve "Cannot use with pooling." opening proxy connection

Recieve "Cannot use with pooling." opening proxy connection

Postby jhoward » Tue 22 Mar 2011 17:32

I have an Oracle user set up for proxy connection from an operating system account (an Oracle user that is "defined externally"). I can successfully make a proxy connection from an OCI application that supports it so all the database server side stuff is correct. But I can't connect with the Devart.Data.Oracle OracleConnection class. I don't want connection pooling, just a proxy connection. Here's my C# code:

string connectString = "Data Source=ORCL;";
string proxyConnectString = connectString + "User Id=;Password=;Direct=False;";
connectString = connectString + "User Id=myorauser;Direct=False;";
OracleConnection dbProxyConnect = new OracleConnection(proxyConnectString);
dbProxyConnect.Open();
OracleConnection dbConnect = new OracleConnection(connectString);
dbConnect.Open(dbProxyConnect);

When the final statement is executed, Devart.Data.Oracle throws the "Cannot use with pooling." exception with this partial stack stack trace:
at Devart.Data.Oracle.OracleConnection.Open()
at Devart.Data.Oracle.OracleConnection.Open(OracleConnection proxy)
jhoward
 
Posts: 2
Joined: Tue 22 Mar 2011 16:49

Postby Shalex » Wed 23 Mar 2011 08:59

Please turn off pooling for your dbConnect connection:
connectString = connectString + "User Id=myorauser;Direct=False;";
-->
connectString = connectString + "User Id=myorauser;Direct=False;Pooling=false;";
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby jhoward » Wed 23 Mar 2011 15:56

That should have been obvious if I had read the documentation a little more carefully.
THANKS!
jhoward
 
Posts: 2
Joined: Tue 22 Mar 2011 16:49


Return to dotConnect for Oracle