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

Discussion in 'ASP .Net' started by Elmo Watson, Jun 14, 2007.

  1. Elmo Watson

    Elmo Watson Guest

    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?
     
    Elmo Watson, Jun 14, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lee Simpson
    Replies:
    0
    Views:
    1,614
    Lee Simpson
    Jul 18, 2003
  2. Tony
    Replies:
    6
    Views:
    7,389
  3. NicK chlam via DotNetMonster.com
    Replies:
    0
    Views:
    4,913
    NicK chlam via DotNetMonster.com
    Mar 21, 2005
  4. Replies:
    0
    Views:
    417
  5. Jeremy
    Replies:
    5
    Views:
    189
    Jeremy
    Apr 30, 2004
Loading...

Share This Page