http://qs321.pair.com?node_id=192176

peacemaker1820 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks
I have a problem. I seem to be doing everything correct, but my info is not getting into the database. IF you notice, I put an error tracking statement print $dbh->errstr right before the executtion takes place. I tried to put this statement after the execute statemtn but it didn't execute. So the error i get is this "DBI::db=HASH(0x2305378)->errstr"
Any Ideas?? Thanks
use DBI; #database parameters my ( $data_source, $database, $user_id, $password ) =qw ( servername d +omain username password ); my $conn_string = "driver={SQL Server}; Server=$data_source; Database= +$database; UID=$user_id; PWD=$password"; #Connect the database handle. my $dbh = DBI->connect("DBI:ODBC:$conn_string") or die "$DBI::errstr\n +"; $insertSQL = <<'EndOfSQL'; INSERT INTO delivery (customerNo,salesOrderNo,sequenceNo,incrementNo,requestDate,quantity,d +eliveryDate,externalNotes,shipVia) VALUES(?,?,?,?,?,?,?,?,?) EndOfSQL my $insertHandle = $dbh->prepare($insertSQL) or die "Problem creat +ing inserting handle: ", $dbh->errstr; ########### show error ########## print "$dbh->errstr"; $insertHandle->execute('customerNo', 'salesOrderNo', 'sequenceNo', 'none', 'dateD', 'quantityD', 'dateD', 'none', 'companyD') or die "Problem Inserting: ", $dbh->errstr; #EndofSQL # Execute the query $SQL->execute() || die "Couldn't execute statement: $DBI::errstr\n"; $rowCount = $SQL->commit(); $dbh->disconnect();