|"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!