X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/008c2e1529744e195616ac2cbf7736f06a90816e..0f0cb3b708f9078b774a07cecd996e5bdc5fac63:/SL/USTVA.pm diff --git a/SL/USTVA.pm b/SL/USTVA.pm index a5db373ad..72bf0b16e 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -518,9 +518,7 @@ sub query_finanzamt { my $filename = "sql/$table.sql"; my $tst = $dbh->prepare("SELECT * FROM $table"); - $tst->execute; - if ($DBI::err) { - + $tst->execute || do { #There is no table, read the table from sql/finanzamt.sql print qq|

Bitte warten, Tabelle $table wird einmalig in Datenbank: $myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...

|; @@ -529,7 +527,7 @@ sub query_finanzamt { #execute second last call my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr); $dbh->disconnect(); - } + }; $tst->finish(); #$dbh->disconnect();