Question about adodb programming & mssql server 2008
Posted on 2009-05-01
I've written a few programs that did minimal access to a sql server.
I just finished converting a VB6 app that we use in house to use sql server as the datasource. Previously we used random access files shared over a network.
The connection to the datasource is used constantly throughout the program to get new support issues, to refresh other employees' status on the screen, etc. And each employee is in a different location, so data access speed is critical to the app.
Should I open the connection one time when I first load and close it when I exit? Or should I open/close the connection every time I access the datasource.
IF I should leave the connection open, what about recordsets? What circumstances would dictate whether recordsets are left open or open/closed?
Thanks for your help!