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
Syntax error (missing operator) in query expression
ASA 8.3 NAT Configuration
Can windows 7 netbook join an sbs2003 domain?
how to load a php include after page is loaded?
Display logon message to new users at first logon.
No Networking Installed on Windows 2008 VM After Migrating From VMWARE Server to ESXi Server
530 error bounced email when sending to any sbcglobal.net address from our sbs 2003 server. The ISP is sbcglobal DSL line.
Is there a way to use visual basic 6 to write data directly to a cd or dvd for windows, xp, vista and 7
iPhone citrix reciever with Citrix Access Gateway
Using Bash command in Perl Script