Board index » Visual Studio » Multiple Connection Objects within VB Code
|
Charisse
|
Multiple Connection Objects within VB Code
Visual Studio135
What is everyones' opinion on writing VB code and having every subroutine/function instantiating a new instance of a connection object and opening the connection to the database? I'm currently supporting a VB6 program that has about 25+ of these within the code. Of course, the servername, username/password are all hard-coded. Not even a global variable. To me, this is just sloppy and injudicious programming. I can't imagine creating a connection to the database similar to a stateless environment over and over again -- especially with desktop client/server applications, unless specifically required. Am I the only one that feels this way? - |
