I'm writing a desktop application that will be using the MySQL Connector for .Net.
I'm wondering if it is better to have one connection that is openend when the app starts, and then closed when the app terminates, or should i have each method (Function) open and close the connection (basically being opened to perform one action, and then closed again).
What's the best way to go about this. My application both reads and writes to the database.
(Additional information: this is an order tracking system)
I'm wondering if it is better to have one connection that is openend when the app starts, and then closed when the app terminates, or should i have each method (Function) open and close the connection (basically being opened to perform one action, and then closed again).
What's the best way to go about this. My application both reads and writes to the database.
(Additional information: this is an order tracking system)