Recieve "Cannot use with pooling." opening proxy connection

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jhoward
Posts: 2
Joined: Tue 22 Mar 2011 16:49

Recieve "Cannot use with pooling." opening proxy connection

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

Shalex
Devart Team
Posts: 8079
Joined: Thu 14 Aug 2008 12:44

Post by 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;";

jhoward
Posts: 2
Joined: Tue 22 Mar 2011 16:49

Post by jhoward » Wed 23 Mar 2011 15:56

That should have been obvious if I had read the documentation a little more carefully.
THANKS!

Post Reply