Assigning null to OleDb.OleDbConnection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Assigning null to OleDb.OleDbConnection

    Hi

    How can I assign a null value to a variable of type OleDb.OleDbConn ection?

    Thanks

    Regards


  • Armin Zingler

    #2
    Re: Assigning null to OleDb.OleDbConn ection

    "John" <John@nospam.in fovis.co.ukschr ieb
    >
    How can I assign a null value to a variable of type
    OleDb.OleDbConn ection?
    dim con as OleDb.OleDbConn ection

    '...
    con = Nothing

    That's it?


    Armin

    Comment

    • rowe_newsgroups

      #3
      Re: Assigning null to OleDb.OleDbConn ection

      On Aug 5, 9:55 pm, "John" <J...@nospam.in fovis.co.ukwrot e:
      Hi
      >
      How can I assign a null value to a variable of type OleDb.OleDbConn ection?
      >
      Thanks
      >
      Regards
      C#'s "null" should be replaced with "Nothing" in Visual Basic.

      But if you concerned with terminating the connection you should really
      call connection.Clos e() or connection.Disp ose() or just wrap the
      connection object in a using block

      Thanks,

      Seth Rowe

      Comment

      Working...