473,586 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP odbc error reporting

13 New Member
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("D SN", "", "") 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_Drop ped 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 3153
ronverdonk
4,258 Recognized Expert Specialist
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
1443
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 public."Return_Some_Text"() RETURNS SETOF varchar AS 'DECLARE
14
10120
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 I should give back to the community by posting our findings. Thanks you all for all your help till now by posting problems and their solutions. ...
4
2710
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, Users and IT have a warm fuzzy feeling of contentment. Turns out Helpdesk application is short of decent reporting capabilities. So, I create an...
0
755
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 General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR Driver's...
0
12025
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 '/CinemaBookingSystem' Application. -------------------------------------------------------------------------------- ERROR General error Unable to open registry...
8
9619
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 work from
1
2504
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 not reporting this error consistently but when it does occur no other changes to the app can be made and Access has to be closed. The application is...
1
2484
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 Access limitations. So I do a lot of table imports and then run the reports off local tables. Now, our Data Department are proposing to migrate all...
1
5520
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 software was ISAM-based and relied on a product called Transoft U/SQL to create "simulated" ODBC connections to the data for querying and reporting. The...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.