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?
regards
crunix. 5 1916
"crunix" <cr******@spyma c.com> wrote in message
news:4u******** *************** *********@4ax.c om... 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 precise
value will enable people to have some idea of what might be wrong. It will
also enable you to look this up for yourself in the DB2 manuals.
Also, the SQLCode is often more useful than the SQLState since the messages
for the SQLCode are more detailed. If you can determine the SQLCode, that
would be very helpful.
Rhino
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******@spyma c.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 precise value will enable people to have some idea of what might be wrong. It will also enable you to look this up for yourself in the DB2 manuals.
Also, the SQLCode is often more useful than the SQLState since the messages for the SQLCode are more detailed. If you can determine the SQLCode, that would be very helpful.
Rhino
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******@spyma c.com> wrote in message
news:f9******** *************** *********@4ax.c om... 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******@spyma c.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
To display SQLSTATE and SQLCODE values in a PHP program using the
Unified ODBC driver, you can create a function like the following:
function display_error($ connection) {
// odbc_errormsg returns last SQLCODE and error text
$message = odbc_errormsg($ connection);
// odbc_error returns last SQLSTATE
$sqlstate = odbc_error($con nection);
print("<p>Error message = $message</p>");
print("<p>SQLST ATE = $sqlstate</p>");
}
Then you can call the function when you detect an error condition:
$rc = odbc_exec($conn ection, $sql_statement) ;
if ($rc == FALSE) {
display_error($ connection);
}
Hopefully this helps you retrieve some more useful information for
debugging the problem.
Dan
P.S. Sorry for the late reply, my usual newsgroup server appears to be
rather intermittent.
Rhino wrote: 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******@spyma c.com> wrote in message news:f9******** *************** *********@4ax.c om...
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****@NOSPA M.sympatico.ca> wrote:
"crunix" <cr******@spyma c.com> wrote in message news:4u***** *************** ************@4a x.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...b ut 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 precise value will enable people to have some idea of what might be wrong. It will also enable you to look this up for yourself in the DB2 manuals.
Also, the SQLCode is often more useful than the SQLState since the messages for the SQLCode are more detailed. If you can determine the SQLCode, that would be very helpful.
Rhino
Thanks a lot for your help, i'm going in newxt days to have some
beta testing time...i will let you know if i solve my problem.
Thanks
crunix83
On Mon, 23 Aug 2004 10:23:13 -0400, Dan Scott <da*******@ca.i bm.com>
wrote: To display SQLSTATE and SQLCODE values in a PHP program using the Unified ODBC driver, you can create a function like the following:
function display_error($ connection) { // odbc_errormsg returns last SQLCODE and error text $message = odbc_errormsg($ connection);
// odbc_error returns last SQLSTATE $sqlstate = odbc_error($con nection);
print("<p>Error message = $message</p>"); print("<p>SQLST ATE = $sqlstate</p>"); }
Then you can call the function when you detect an error condition:
$rc = odbc_exec($conn ection, $sql_statement) ; if ($rc == FALSE) { display_error($ connection); }
Hopefully this helps you retrieve some more useful information for debugging the problem.
Dan
P.S. Sorry for the late reply, my usual newsgroup server appears to be rather intermittent.
Rhino wrote: 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******@spyma c.com> wrote in message news:f9******** *************** *********@4ax.c om...
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****@NOSP AM.sympatico.ca > wrote:
"crunix" <cr******@spyma c.com> wrote in message news:4u**** *************** *************@4 ax.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
precise
value will enable people to have some idea of what might be wrong. It
will
also enable you to look this up for yourself in the DB2 manuals.
Also, the SQLCode is often more useful than the SQLState since the
messages
for the SQLCode are more detailed. If you can determine the SQLCode, that would be very helpful.
Rhino
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: redneck_kiwi |
last post by:
Hi all:
I have a really weird problem. I am developing a customer catalog
system for my company and as such have delved into sessions for
authentication and access levels. So far, I have managed to get a
working system just about finished.
I am building an interface for our customer service folks to use to
manage registered customers and am seeing some weird behavior.
|
by: NanQuan |
last post by:
I'm hoping someone can help me solve this error since I am at a total
loss here. Usually I don't bother posting on any forums or groups on
the internet and prefer to solve stuff myself but this is a total
mistery.
I have a function inside an ASP page as a result of which I get the
following error message:
Microsoft VBScript compilation error '800a03ea'
|
by: Don Munroe |
last post by:
This one has me stumped. I have three web applications running on two
different servers. The first that works fine is hosted by a .Net hosting
company. Everyone that uses it has no problems hitting the site. The other
two applications are running on my personal server which has Windows 2003,
IIS 6, and .Net 1.1
Most of my users can use the sites. Two have come up with a very strange
problem. They try to go to either application and...
|
by: gh0st54 |
last post by:
Hi
I have a weird javascript error that only happens on my live server
when i open the page http://www.imrated.co.uk/reg.aspx
i get the error 'Problems with this page ... blablabla
Line : 3
Char : 1
Error:Syntax error
|
by: Jensen Bredal |
last post by:
Hello,
I need to display self refreshing information on a web page written with
asp.net. I would image that the info would be displayed either as part of a
user control or a web control.
How can this be done? The information will come from a database and the
displaying should loop throug a table in
the database.
Many thank in advance
JB
| |
by: Alan Silver |
last post by:
Hello,
I have two weird problems here. I have a master page file that works
absolutely fine. When I load it up in VWD, I get a couple of weird (to
me) errors.
First, I get the error "Unrecognized tag prefix or device filter 'asp'"
on the third line shown below...
<head runat="server">
|
by: Dan |
last post by:
Hi,
i'm not sure to understand the difference between refreshing the pagina by
clicking on 'refresh' in the browser and a postback.
What i think it is:
Suppose a page with a form containing a textbox and a dropdowlist: and a
button to start something n code-behind:
a refresh doesn't send any value back to the server but with a postback, the
values are sent?
But then, which role does Viewstate play in the postback proces?
|
by: honey99 |
last post by:
Hi!
I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters the combobox...but the data in the combobox of parent window(Ex1.jsp) is entering only when i refresh...
|
by: d3vkit |
last post by:
I recently had a friend pass along some web work for me; a simple update. I for some reason decided I would do some overhauling of the page (he had been doing straight html and I figured some php would make things MUCH more manageable, especially with the pictures).
So, I set to work doing what I normally do for all my site, create the index page with a switch to stick different content in the main part of the page depending on variables passed...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |