I think you'll need to improve the error handling in your php program. I
don't know the php language myself but every other language I know offers
ways to display the values of SQLState, SQLCode, and often the SQLMessage.
All you have to do is display those values if your program hits an
unexpected condition.
I don't know if php and Perl are related - they certainly *look* similar -
but this fragment from the Application Development Guide shows how to store
the values of the SQLState and the SQLCode in Perl. Perhaps the technique
for php is the same?
----------------------------------------------------------------------------
----------------------------------
To return the SQLSTATE associated with a Perl DBI database handle or
statement handle, call the state method. For example, to return the SQLSTATE
associated with the database handle $dbhandle, include the following Perl
statement in your application:
my $sqlstate = $dbhandle->state;
To return the SQLCODE associated with a Perl DBI database handle or
statement handle, call the err method. To return the message for an SQLCODE
associated with a Perl DBI database handle or statement handle, call the
errstr method. For example, to return the SQLCODE associated with the
database handle $dbhandle, include the following Perl statement in your
application:
my $sqlcode = $dbhandle->err;
----------------------------------------------------------------------------
----------------------------------
When you know the SQLState and SQLCode, it will be MUCH easier to determine
what your problem is.
Rhino
"crunix" <cr******@spymac.com> wrote in message
news:f9********************************@4ax.com...
Sometimes SQLSTATE is unreadeble other times it is just like this one:
SQLState: X
On Thu, 19 Aug 2004 15:10:13 -0400, "Rhino"
<rh****@NOSPAM.sympatico.ca> wrote:
"crunix" <cr******@spymac.com> wrote in message
news:4u********************************@4ax.com.. . Hello.
I have developed a medical application with php 4 linked to IBM DB2
database.
The database connection is right and i can access data with no
problem...but sometimes when i reload the page which has been already
loaded (by pressing CTRL-R) i receive an SQL STATE Error:
"(...) SQL State: X (..)"
it looks like the error i receive when i was having my first trouble
with ibm db2 as i did not exported the DB2 istance.
but i can not understand while sometimes it works and sometimes no...
anyone can help me?
Which particular SQLState are you getting in the error message? The
precisevalue will enable people to have some idea of what might be wrong. It
willalso enable you to look this up for yourself in the DB2 manuals.
Also, the SQLCode is often more useful than the SQLState since the
messagesfor the SQLCode are more detailed. If you can determine the SQLCode, that
would be very helpful.
Rhino