# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
#======================================================================
# Utilities for ustva
#=====================================================================
#======================================================================
# Utilities for ustva
#=====================================================================
- 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 };