CoverYourASP --> Snippets

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
50 active users
1050 visitors today
905 pages today
(only part of today)
Tools I use

Copyright © 1999-2016 James Shaw.
All rights reserved.

RSS submissions

Now open source with SourceForge!

"Snippets" are mini-articles - they allow me to very quickly add answers to your frequently asked questions, and add brief explanations for topics that you've searched for without success. So, everytime you send an email or perform a search, chances are a new snippet will be the result!

27 Oct: Using Access? Enable Connection Pooling.

Here's a quick tip for anyone running their site from an Access database like I do: Use connection pooling. This was one of the many excellent suggestions Steve Moore gave me when I was starting up this site.

A pool of connections to the database is shared across ASP sessions, like a cache. Calling DBReleaseConnection as soon as possible after using the recordset is crucial, since that is when the connection is given back to the pool.

Here's how to set it up:

- Open the registry editor by running the regedit tool (Run regedit.exe).
- Go to the \HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ Microsoft Access Driver (*.mdb) registry key.
- Check if CPTimeout string exists.
- If the CPTimeout string does not exist add the Key string via the Edit, New, String Value
- The CPTimeout Key string should be set to 60 (60 seconds)

As always, whenever the registry is mentioned, you see a warning - YOUR MACHINE MAY NEVER WORK AGAIN. Be careful!

Featured sponsor
My favorite resources

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!

New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!