Microsoft
Software
Hardware
Network
Question : SQL Server connection throws System.InvalidOperationException
Hi I am trying to connect to a SQL 2008 64 bit database from a c# porogram coded in Visual C# 2005 express.
My connection string is as follows.
SqlConnection myConnection = new SqlConnection("uid=UerserI
D;pwd=Pass
word;serve
r=serverna
me.domain.
local;Trus
ted_Connec
tion=False
;database=
MyDatabase
Name;conne
ction timeout=30");
this fails with a systeminvalidoperationexce
ption.
Can any assist me to get this working.
Answer : SQL Server connection throws System.InvalidOperationException
You get an InvalidOperationException when you try to execute an operation on an object but the object is not yet in he right state to be executed.
It could be because you don't open the connection.
Can you post the code what executes the connection
Random Solutions
Using jqzoom (jquery)
How to change properties.settings after deployment of windows application
How to export data from Sql server to text or xml file using SSIS
Am I elegible for a free upgrade to Outlook 2010 with this?
Access user control function from master page
Cisco VTY Access to particular line number
Standard server 2008 to SBS premium 2008
How do I convert string to char?
how to find my Symantec pcAnywhere serial number
How to Configure Link aggregation on Cisco 3560G?