The above snippet produces the following error... DBD::XBase::db do failed: Field Y not found in table INV But all the other statements write the proper data to the Database file, and the my $updy="Y"; $dbh->do("UPDATE INV SET SOLD=$updy WHERE CODE==$CODE"); is written exactly the same as all the other statements. If someone could point out my mistake, or even give me a few tips I would appreciate it greatly.sub sold_rep_calculations { $dbh->do("UPDATE INV SET PRICE=$PRICE WHERE CODE==$CODE"); $dbh->do("UPDATE INV SET SALESMAN=$SALESMAN WHERE CODE==$CODE"); $dbh->do("UPDATE INV SET DATE_SOLD=$date WHERE CODE==$CODE"); my $updy="Y"; $dbh->do("UPDATE INV SET SOLD=$updy WHERE CODE==$CODE"); $dbh->do("UPDATE SALESMAN SET YTDGROSS=( $YTDGROSS + $PRICE ) WHERE ID==$ID"); $dbh->do("UPDATE SALESMAN SET YTDCOMM=( $YTDCOMM + ( $PRICE * $COMM / 100 ) ) WHERE ID==$ID"); $dbh->do("UPDATE SALESMAN SET COMM_OWED=( $COMM_OWED + ( $PRICE * $COMM / 100 ) ) WHERE ID==$ID"); }
In reply to Perl Beginners problem with DBI by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |