473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PHP odbc error reporting

13
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?
Jan 30 '08 #1
1 3144
ronverdonk
4,258 Expert 4TB
Keep in mind that odbc_connect() returns an integer, and not a PHP5 boolean! And why do you test the $link resource id. If there had been an error it would have taken the die() branch.

Ronald
Mar 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: jarednevans | last post by:
I need to know why MS Access/ODBC is reporting different results than the one shown in psql. I created a very simple function below: ------------------ CREATE OR REPLACE FUNCTION...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
4
by: Phil Latio | last post by:
Scenario is: We have an intranet on which a Helpdesk application can be accessed. Data input into the Helpdesk is stored in a Access 2000 database, held on a server. This is great, works fine,...
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
1
by: nepeterson | last post by:
An application I built to make updates to a linked database table is occasionally giving this error message: error - (-292) An implied insert column (column name) does not accept NULLS. Users are...
1
newnewbie
by: newnewbie | last post by:
Hi, Our vendor has a database that I connect to via ODBC. I work in Access. All the tables are "informix". The reports I run are rather painful to run due to the size of the original database and...
1
by: steven_nospam at Yahoo! Canada | last post by:
I am a UNIX person (not much experience with MS Access) who during a recent upgrade on an IBM RS/6000 server had to convert our system due to an upgrade to a new software revision. The old...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.