Help define own error message in DBI - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > Perl » Help define own error message in DBI


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-27-2006   #1 (permalink)
gabriel
Member
 
Join Date: Jul 2006
Age: 38
Posts: 30
Default Help define own error message in DBI

Hello!

I'm accessing to an Oracle DB using perl's DBI. Like this:

$sth = $dbh->prepare("update...");
$sth->execute($nw,$start,$ende,$old );
$rv = $sth->rows;

If I give the table name and column names in the prepare line
incorrectly (eg: I want to update a row that isn't exists) I get

DBD::Oracle::st execute failed: ORA-00904: "UCRPA": invalid identifier error message.
How can I define my own error message in this case, like:
die (" Can't update because invalid entry was defined");

I tried using eval and HandleError, but these didn't work for me.
Thanks
gabriel
gabriel is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Define Spam ebittner All Things General 19 09-30-2006 02:10 PM
What HTTP error is generated when there is an error in an ASP page? agaba175 ASP 0 08-05-2006 08:25 PM


footer left
All times are GMT. The time now is 09:35 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Loans | Car Finance | Advertising | Glitter Graphics | Car Finance

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49