andreas domevscek

andreas domevscek

  • NA
  • 21
  • 8.5k

ODP.Net doesnot open

Sep 26 2014 5:46 PM
Hello,


In web.config file
<add name="OraAspNetConString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(sid=orcl)));User Id=xxx;Password=xxx;"/>


In asp page
string CS = ConfigurationManager.ConnectionStrings["OraAspNetConString"].ConnectionString;
OracleConnection con = new OracleConnection(CS);
string sqlQuery = "select Id, CityName, Country from nha.tblCity";
OracleCommand cmd = new OracleCommand (sqlQuery, con);
Wenn con.open() i get blank page
How can i fix this?
Wenn i dont do open, page works correctly so i conclude that OracleConnection works fine
still not found