Error message occurs when you run commands on a command object: "Unhandled exception of type 'System.InvalidOperationException'" (311544)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q311544
This article refers to the following Microsoft .NET Framework Class Library namespaces:
- System.Data
- System.Data.OleDb
- System.Data.SqlClient
SYMPTOMS
If you run commands or call methods of the SqlCommand or OleDbCommand object, you receive the following error message if a connection is not open:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: ExecuteReader requires an open and available Connection (state=Closed).
REFERENCES
For more information about ADO.NET objects and syntax, refer to the following topic in the Microsoft .NET Framework Software Development Kit (SDK) documentation or MSDN Online:
Modification Type: | Minor | Last Reviewed: | 3/9/2006 |
---|
Keywords: | kbprb kbSqlClient kbSystemData KB311544 |
---|
|