Results 1 to 2 of 2
2002-12-26, 19:30 #1
- Join Date
- Jan 2001
- Serbia and Montenegro (Yugoslavia)
- Thanked 0 Times in 0 Posts
Connection best practices question (VB6)
I have built a multi user application that is getting more multi user month by month. I am about to make several upgrades to the app and wanted to get some input.
I found that the application runs faster by creating a global connection object after successful authentication, then using that connection object during that session without closing it.
I'm guessing that if many more concurrent users start using this application this could become a problem. Currently it is pointing to an Access 2K database and I was going to make a second version that uses SQL Server as its back end. I think each connection will take up a license on the SQL Server, and I don't know if it is practical keeping the connection open with multiple users performance wise.
On the flip side, each time it has to make a connection it will take time. What is the correct way to do what I'm trying to accomplish here?
2002-12-26, 20:14 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 93 Times in 89 Posts
Re: Connection best practices question (VB6)
Yes, it takes time/resources to create connection objects, although there is some "pooling" of connections by ADO to make it more efficient (search for connection pooling in the Lounge, esp. in Access). If your application is a middle tier, and the identity of the user is irrelevant to the database (i.e, everyone has the same rights), you probably can continue with your current approach. On the other hand, at some point you might find yourself having to queue user requests in your application, which is a headache that the database engine probably could handle for you if you use separate connections. As for the SQL Server license question, MS does want you to purchase a CAL for every set of eyeballs even if the proxy doesn't identify them. (I think this is a change from when I looked about 9-12 months ago, but I don't have notes handy.)