TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ASWIN KUMAR
NA
8
1.1k
'ObjConn_serverversion' threw an exception
Apr 15 2015 6:32 AM
Hello,
I am trying to connect to the Database from the application and its not happening at all. The same DLL is working fine in QA and production.
When debugging I understood the SQL connection is always closed.
when I checked the below line of code,
public static SqlConnection objConn = new SqlConnection(strConnStr);
For objConn I was able to see an exception "'ObjConn_serverversion' threw an exception of type System.InvalidOperationException" and the state was CLOSED.
Please let us know whether you can help me with this.
Connection String:
During debug I found the below error message in objConn
Hide
Copy Code
public
static
SqlConnection objConn =
new
SqlConnection(strConnStr);
ServerVersion --> 'objConn.ServerVersion' threw an exception of type 'System.InvalidOperationException'
State --> Closed
Source code was initially developed in VS 2008. Now when I opened the solution it automatically takes me to Visual studio 2010 Conversion wizard, I am not sure whether this is something to do with this.
Reply
Answers (
0
)
Generate Gridview Based on Columns in Table of Sql server
Yahoo BOSS and OAuth