Home: Perl Programming Help: DBI:
getting DBI::errstr in server side



rohant
Novice

Jan 21, 2007, 9:39 PM


Views: 5447
getting DBI::errstr in server side

dear all,
i am catching the error in cgi script on server side.
if the DAO ie. DB error occurs like database connection failed.
then i want that errors string to be accessible in server cgi script
but i cant use the global variable DBI::errstr as its on server side and i want it for specific clients.the varible $dbh database hadndler wont work as it will be undefined. can i get this value in some variable so that i can use it.

thanks in advance
-Rohant


davorg
Thaumaturge / Moderator

Jan 22, 2007, 5:11 AM


Views: 5443
Re: [rohant] getting DBI::errstr in server side

I don't understand why you can't use DBI::errstr. That's what I've always used in this case. Can you be more specific about why you think you can't use it?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks