MySQL Forums
Forum List  »  Perl

Problem with DBI error handling
Posted by: Pauli Leppänen
Date: November 03, 2006 05:27AM

I'm using Perl, CGI,DBI and Mysql 5.0.18.

I'm using an sql update -sentence which does not work. However, I can't
catch the error message which DB gives when using DBI. If I run the sql
directly in mysql I get the error message.
I have tried to use all error handling methods I know but this very error message
I can't catch.
But when I write for example the word WHERE wrong in sql the error handling works as I expect.

The where part of the sql sentence:

where koe='301' and esitys_pvm='3.11.2006' and toimenpidekoodi='32'

gives this error message

Incorrect date value: '3.11.2006' for column 'esitys_pvm' at row 1

Is this not serious enough as an error message for the error handling?!

I'm testing like this after execute:

if ($sth3->err())

I have tried those RaiseError and PrintError methods with connect also.

Can anybody help?

Pauli

Options: ReplyQuote


Subject
Written By
Posted
Problem with DBI error handling
November 03, 2006 05:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.