Hi,
Is there a list of Error Codes and Messages posted some where. I
couldn't find one.
I'm trying to use trap errors caused by database constraints using perl
DBI. ie: -
create table foo (id, user, name,
constraint foo_user_name_ind unique (user, name);
...
my $insert = "insert into foo (user, name) values ('dlink', 'fish')";
my $err = "";
$dbh->do($insert) or $err = DBI::err;
if ($err) {
my $errstr = DBI::errstr;
print "Error: $err\n";
print DBI::errstr, "\n";
}
By doing this I see that "ERROR: Cannot insert a duplicate key into
unique index X" has an error number 7.
Thanks.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com