in reply to Problem with INSERT statement

You may need the commit (or turn autocommit on in DBI), but the finish is unnecessary. Perhaps you're actually starting a new transaction by using it. Try removing it...?

Replies are listed 'Best First'.
Re^2: Problem with INSERT statement
by sasrs99 (Acolyte) on Dec 19, 2006 at 21:16 UTC
    No luck. Here's how the bottom section looks now but I still get the error:
    my $insert_handle = $dbh->prepare("INSERT INTO pac.presof (id , dlr +splrcode , loc , ite +m , qty , dlr +net , mes +sage , pla +nnercode , sum +) VALUES (?, +?,?,?,?,?,?,?,?)"); die "Couldn't prepare queries; aborting" unless defined $inse +rt_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