> use strict; > use DBI; > $sth->bind_param( 1, \$insertid, SQL_INT); #insertid from other > insertion > $sth->bind_param( 2, \$ap, SQL_DOUBLE);
You need to tell DBI to import the SQL type constants. This is done by replacing 'use DBI;' above with: use DBI qw(:sql_types); Note that SQL_INT is not a valid type: you want to use SQL_INTEGER instead. You can view all the available types with this bit of code, taken from the documentation for DBI: no strict 'refs'; for (sort @{ $DBI::EXPORT_TAGS{sql_types} }) { printf "%s=%d\n", $_, &{"DBI::$_"}; } In addition, whichever database driver you are using may have its own type constants available. For example, if you are using Postgres, you can specify: use DBD::Pg (:pg_types); Hope that helps. -- Greg Sabino Mullane [EMAIL PROTECTED] [EMAIL PROTECTED] End Point Corporation http://www.endpoint.com/ PGP Key: 0x14964AC8 200608011102 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
signature.asc
Description: This is a digitally signed message part