my $insert_handle = $dbh->prepare("INSERT INTO pac.presof (id , dlrsplrcode , loc , item , qty , dlrnet , message , plannercode , sum) VALUES (?,?,?,?,?,?,?,?,?)"); die "Couldn't prepare queries; aborting" unless defined $insert_handle; $insert_handle->execute( @bind_params ) or die LogMsg("There is a problem with the insert into PAC.PRESOF " . $dbh->errstr); $dbh->commit; @bind_params = (); } $dbh->disconnect(); return 1; # Success