Hi Guys.I am trying to connect to a Sql Server in my apllication using the following code :
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString = "Data Source = (local);Initial Catalag = Inventory;
Persist Security Info = false;
Integrated Security = true;
Packet Size = 4096;Connect TimeOut = 30";
myConnection.Open();
where Inventory is my database and it exists on my local machine.
"Error 40: Could not open a Connection to Sql Server" ---error comes while the above code executes.