Oracle error handling
From: Susan Lam (susanzlam_at_yahoo.com)
Date: 02/24/05
- Previous message: Ron Reidy: "RE: perl oracle connection not working from browser"
- Next in thread: Ron Reidy: "RE: Oracle error handling"
- Maybe reply: Ron Reidy: "RE: Oracle error handling"
- Maybe reply: Hardy Merrill: "RE: Oracle error handling"
- Reply: Michael A Chase tech: "Re: Oracle error handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Feb 2005 05:08:50 -0800 (PST) To: dbi-users@perl.org
Hi,
I'm new to perl. I apologize if this is not the right
place to post newbie questions.
If mytable does not exist, I would like to trap the
Oracle error message and write the message to an
Oracle table. I know how to write to a table but I do
not know how to trap the message.
$dbh =
DBI->connect("dbi:Oracle:mydb",scott,tiger,{RaiseError
=> 1, AutoCommit => 0}) || die "Database connection
failed: $DBI::errstr";
$sql = qq {select * from mytable};
$sth = $dbh->prepare($sql);
$sth->execute;
$dbh->disconnect;
Also, if mytable does exist, how can I obtain the row
count returned from the above query and assign it to a
variable?
I appreciate any help I can get.
thanks.
susan
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
- Previous message: Ron Reidy: "RE: perl oracle connection not working from browser"
- Next in thread: Ron Reidy: "RE: Oracle error handling"
- Maybe reply: Ron Reidy: "RE: Oracle error handling"
- Maybe reply: Hardy Merrill: "RE: Oracle error handling"
- Reply: Michael A Chase tech: "Re: Oracle error handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]