?
Solved

Question about adodb programming & mssql server 2008

Posted on 2009-05-01
2
Medium Priority
?
220 Views
Last Modified: 2013-12-25
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!
0
Comment
Question by:lthames
2 Comments
 
LVL 6

Accepted Solution

by:
PIERCGG earned 2000 total points
ID: 24281798
We never open the datasource until the moment a transaction needs to be processed; period.
0
 

Author Closing Comment

by:lthames
ID: 31576993
Thanks!  I followed your advice and so far everything seems very fast to access.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Simple Linear Regression

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question