Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my ERP am using oracle and vs2010.I used oracle connection since its a financial application.
But wen i published that and chking in page( clicking on the save button at time by 2 or more user),
one user page is saving and for others showing error message "Connection must be open for this operation".wen i chked this in google, its saying its the issue of vs2010.
anyone have any idea about this error.
please help me
Posted

Check in your code that you are opening a connection

C#
using (OracleConnection connection = new OracleConnection(ConnectionString))
{
  connection.Open(); //<-- must have
  //rest of code omitted
}
 
Share this answer
 
As per the error message you should open the connection:

C#
if (myConnection != null && myConnection.State == ConnectionState.Closed)
{
   myConnection.Open();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900