Connection question

K

kathleenyanolatos

I'm using ASP to connect to an Access 2003 database on a Microsoft
2003 server running IIS. To access the data, I open up a DNS-less
connection and use SQL queries to get the records. Many of the sites
have several queries and I'd like to know whether or not I should open
and close the connection for each query, open one connection for a
page and then close it at the end, or do something in between. Thank
you for your help!
 
D

Douglas J. Steele

I believe that the general advice is to open the connection when required,
and free it up when complete. If you're running your multiple queries one
after another in the same routine, a single connection should be okay. If
you move from routine to routine, you should probably limit the scope of
each connection to the single routine.
 
K

kathleenyanolatos

Thank you for the response. That's what I assumed, but I just wanted
to make sure I wasn't making a massive mistake.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top