- while ( my $row_ref = $sth->fetchrow_arrayref() ) {
- push @positions, @$row_ref; # Copy the array contents
- }
+ SL::DB->client->with_transaction(sub {
+ my $dbh = SL::DB->client->dbh;
+ my $sth = $dbh->prepare($query);
#There is no table, read the table from sql/finanzamt.sql
print qq|<p>Bitte warten, Tabelle $table wird einmalig in Datenbank:
$myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...</p>|;
#There is no table, read the table from sql/finanzamt.sql
print qq|<p>Bitte warten, Tabelle $table wird einmalig in Datenbank:
$myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...</p>|;
- process_query($form, $dbh, $filename) || $self->error(DBI->errstr);
-
- #execute second last call
- my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr);
- $dbh->disconnect();
+ SL::DB->client->with_transaction(sub {
+ process_query($form, $dbh, $filename) || $self->error(DBI->errstr);
+ 1;
+ }) or do { die SL::DB->client->error };