This should help:
http://search.cpan.org/~timb/DBI/DBI.pm#ShowErrorStatement_(boolean,_inherited)

(In theory all drivers are meant to enbale ShowErrorStatement by
default, unless they have a good reson not to, such as a better
mechanism built-in.)

Tim.

On Thu, Jan 15, 2009 at 02:55:53PM +0100, Deviloper wrote:
> Hello,
> I am using DBI and relativly new to it.
> 
> I get a lot of error messages like
> 
> [Wed Jan 10 05:16:44 2009] DB-INSERT.pl: DBD::mysql::st execute failed: You 
> have an error in your SQL syntax; check the manual that corresponds to your 
> MySQL server version for the right syntax to use near '44522     ','Bonn      
>               at /usr/local/adm/
> DB-INSERT.pl line 123.
> 
> (Its not my code but sadly I have to do the maintenance.)
>  I guess its a quoting error, thats not the problem. but I want DBI and/or 
> SQL die give me the whole Line where the syntax-error occurd not just a 
> useless snip.
> 
> Ok, I could log in case of error by myself. But don´t know how to bring perl 
> to only "onetime" interpolating the query.
> Any comments?
> 
> Thanks,B.

Reply via email to