habibrahman_h has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Errror while execution query
by gellyfish (Monsignor) on Jun 06, 2006 at 10:02 UTC

    It would be very useful to know what kind of thing that $result is. If as I am guessing it is a DBI statement handle, then you should be able to do print $result->errstr()

    /J\

Re: Errror while execution query
by prasadbabu (Prior) on Jun 06, 2006 at 10:03 UTC

    For DBI you have to use errstr().

    You can do manual error checking by using $DBI::errstr.

    For Automatic error checking you have to enable PrintError =>1, RaiseError =>1.

    For Other type of errors, you have to take a look at the System variables $! and if you use eval then use $@ to get the error message.

    updated

    Prasad

    A reply falls below the community's threshold of quality. You may see it by logging in.