ASP to MySQL Database Connection - Connected but has errors
Posted on 2008-10-24
I have a multi-user website that I wrote in ASP with a MySQL backend. I use several include files to load various pages based on request by the user. However, I do not think I have made a database connection efficient enough.
Overall connection type used and how database information is served:
Top of my page I have my odovbs.inc file and just below I have my connection string in a separate file
i.e <!--#include file="sqlConnect/adovbs.inc" -->
<!--#include file="sqlConnect/ttiAConnect.asp" -->
My connection string has another include file in it named chkUser_inc.asp, which is the file that tracks users throughout the site which compares a cookie issued to the user with the user log file, which is written to after they connect.
I have six (6+1) other include files that are added for:
1. checking for what page the user is on
3. logo include file
5. main_page content (which has an include file for serving main_content)
6. now my footer include file, which finally closes the database connection.
When more than 1 user is on, 50% of the time I have errors that tell me my database connection has gone away. I need some ideas how to resolve this problem, as I have disabled new user sign-ups until it is working properly. Any suggestions would be greatly appreciated.