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
XBMC live boot error
Column Name in query
How can I prevent changes to web browser proxy settings?
Quickr..How do I edit the tabs on the home page of my place? I want to add a tab
Event ID 1030 and 1058 Missing gpt.ini - Group Policy
Regular expression and dash in JavaScript
How to collaspe a menustrip in vb.net?
call .rdl with store procedure with parameter
Can't Remote Desktop to Forefront TMG Server
Keystore file to sign jar via a thawte code signing certificate