Hi,
I am using perl DBI
Most of my perl code use prepared statements like this
my $datasource = "dbi:Oracle:";
$abdw_dbh = DBI->connect("$datasource", "$abdw_username/[EMAIL
PROTECTED]")
or die "Can't connect to Oracle database: $DBI::errstr\n";
$abdw_sql_stmt1 = "select AT_COST
from mytable
where key = ?";
print "$abdw_sql_stmt1\n";
### Prepare an SQL statement for execution
$abdw_sth1 = $abdw_dbh->prepare($abdw_sql_stmt1);
$abdw_sth1->execute();
$abdw_sth1->bind_columns( undef, \$hsh_loop_loc, \$hsh_loop_loc_typ);
while ($abdw_sth7->fetch() ) {
$hshLocTypes{$hsh_loop_loc} = $hsh_loop_loc_typ;
}
But my database abdw does go to maintenance many times. So my perl code at
those times will wait till the database problems get right.
What I want is when there is some db problems [even for that matter when tables
are locked by some other user for long time] then
my perl code should exit to calling program with say a exitcode of 1. Is there
any way in code to handle this.
Thanks,
Sunil �