Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Is there a negative to creating a new OracleConnection, but not opening it?

$
0
0

I have a helper class in an external library which takes in an OracleConnection and returns whether it is a Production, User or Test database.

Basically I do 

OracleConnection conn = new OracleConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString);

then

string environmentName = ApplicationEnvironment.GetEnvironment(conn).ToString();

Since I am never opening the connection, can anyone confirm that this is not something to be concerned about?


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>