I am using PHP 5, Pervasive ODBC Client Interface 8.70.14.00 and I have a database connection set up using the code block below. I'm connecting to the Exact Max ERP to do select queries using odbc_connect().
[PHP]$link = odbc_connect("DSN", "", "") or die("Error connecting to DSN.");
if($link <= 0) {
echo "Error:";
echo odbc_errormsg();
exit;
}
echo "Connected.";
odbc_close_all();
echo "Closed.";
[/PHP]
I'm having a problem that sometimes when I try to establish the connection, the browser doesn't return any errors or anything, and it doesn't get to the "Connected." line. This usually happens after I run several queries on the database. Checking the HTTP error logs, I see Connection_Dropped DefaultAppPool messages on the requests that failed. Can anyone advise as to how to debug this problem to find out why some of the connection attempts are getting dropped with no errors returned?