Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. cnall5

    How to share a database connection between different classes

    Yes, The second Form only needs the connection, and does not need to know anything from form1. Therefore, the static member implementation worked well. I am connecting to Access but I hope that migrating to SQLServer in the future will not be too difficult if I have >1 connection. I don't...
  2. cnall5

    How to share a database connection between different classes

    Ok! The static member of a class works! Here is what I used. I created this class in the namespace of my main Form after all declarations etc... of the main form class. I tried to put it before the class fclForm1{ class stuff ...} but this caused some rescource errors. public class...
  3. cnall5

    How to share a database connection between different classes

    I would like to share the same database connection between two Forms. I would like to use the same connection to associate OleCommands that are executed in each form/class. My main form creates my second form (a modal dialog) that I want to use to insert user input to the database. How do I...

Part and Inventory Search

Back
Top