2009/11/9 Parag Kalra <paragka...@gmail.com>: > Hello All, Hello,
> This is my first post here. Are you sure about that? I have a vague recollection of a question you asked about "Optimizing File handling operations" then of course there was the "My name is Larry Wall" for which I apologise :) > I am executing a Perl script which makes use of 'DBI' module. > > I am performing a select operation on a table through the Perl script and I > am getting following error on the console: > > DBD::ODBC::st execute failed: [Oracle][ODBC][Ora]ORA-00942: table or view > does not exist > (SQL-42S02) at Test.pl line 67 > > The error message is well justified as the table doesn't exist. > > However I just wanted to know if there is a way to catch this error message > through some standard DBI variable so that I can print it in a log file as > well. Yes usually $DBI::errstr You will be trying to trap the error from the database driver, in your case, DBD::Oracle. Have a look at the http://search.cpan.org/~pythian/DBD-Oracle-1.23/Oracle.pm There's lots of information there that will be useful to your environment. HTH, Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/