in reply to Ignore Relation already exists error from DBI
Note that the key here is not to die on a return value of undef from the execute, but to execute a subroutine that does some extra checking (which you can make as elaborate as you like).$sth->execute or do_error($DBI::errstr); sub do_error { my $error=shift; return if $error =~ /Relation already exists/; # or whatever the ac +tual error is die "A serious problem occured. According to the rumours: $error.\n" +; }
Update: the above answers your immediate question, but I agree with tomte that your database design probably needs some work.
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Ignore Relation already exists error from DBI
by global (Novice) on Feb 19, 2003 at 12:43 UTC | |
by Tomte (Priest) on Feb 19, 2003 at 12:55 UTC | |
by global (Novice) on Feb 19, 2003 at 13:03 UTC | |
by Tomte (Priest) on Feb 19, 2003 at 13:37 UTC | |
by dws (Chancellor) on Feb 19, 2003 at 17:19 UTC | |
by global (Novice) on Feb 19, 2003 at 21:18 UTC |