error: an exception of type: {System.InvalidOperationException} occurred

E

Elmo Watson

I have a class - I Dim a SQLconnection, then, in Sub New, I instantiate it,
so that it's available to me whenever I reference the class (correct?):
Conn = New SqlConnection(msConn)

Then, in my Subs/Functions, this section (inherited from previous author):
If Conn.State = ConnectionState.Closed Then
Conn.ConnectionString = msConn
Conn.Open()
End If

I step through this, line by line, and Conn.Open never actually opens the
connection. I do a quick watch on 'Conn' and pretty much everything looks
right. the connection is there, the connectionstring is correct.

However - I did a quick watch on 'Conn' - - all except one thing looked
good - on the server version, it reported an error:
ServerVersion <error: an exception of type:
{System.InvalidOperationException} occurred> String

MSDN didn't help -

Any ideas on this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top