Database connection object in global area...

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

    Database connection object in global area...

    I want to create a code module that has a global variable that will
    store a SqlConnection object. The idea is that all of my forms can
    share this connection object. The connection would only be opened by
    the form when needed and closed ASAP, but I wonder if there is any
    downfall to doing this. The idea is to simplify the code and to reduce
    the overhead in creating the connection object each time a connection
    is needed. Does this make sence? Is the real overhead involved in
    opening the connection or creating the connection object? Advice is
    greatly apprecited!

    Thanks

    --- Andrew

Working...