after upgrading my DBD::ODBC to v0.43, i experienced problems with INSERT statements:
dbd_error: SQL-22003 (native 0): [Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003) the statement had worked in the past with v0.28. after much gnashing of teeth, i figured out i could set default back to 1 with the connection handle $dbh. the trace is attached. --andy -- Andy Edwards Edwards Graphic Arts, Inc. [EMAIL PROTECTED]
z:/projects/scripts $ perl post_shipping.pl -v -d -r Entry <DAILY/> is not valid; unable to post PRI charges of 17.85. (X) at post_shipping.pl line 736. Entry <DAILY/> is not valid; unable to post PRI charges of 25.20. (X) at post_shipping.pl line 736. Cannot post UPS charges of .00 to closed job 26371. (C) at post_shipping.pl line 736. Cannot post UPS charges of .00 to closed job 26371. (C) at post_shipping.pl line 736. Cannot post UPS charges of 4.58 to closed job 26371. (C) at post_shipping.pl line 736. Entry <EGA/0> is not valid; unable to post ASCOM charges of 13.65. (X) at post_shipping.pl line 736. Entry <DAILY/> is not valid; unable to post PRI charges of 29.66. (X) at post_shipping.pl line 736. ProMail 5 shipment M24088 refers to closed job 25886. at post_shipping.pl line 585. Entry <EGA/0> is not valid; unable to post ASCOM charges of 1.48. (X) at post_shipping.pl line 736. Entry <DAILY/> is not valid; unable to post PRI charges of 26.51. (X) at post_shipping.pl line 736. DBI::db=HASH(0x1ed0bf0) trace level set to 5 in DBI 1.30-ithread Note: perl is running without the recommended perl -w option -> STORE for DBD::ODBC::db (DBI::db=HASH(0x1ed0bf0)~INNER 'odbc_default_bind_type' 0) thr#15d447c <- STORE= 1 at post_shipping.pl line 369 via post_shipping.pl line 861 -> do for DBD::ODBC::db (DBI::db=HASH(0x1ed0c5c)~0x1ed0bf0 ' insert into BBINVMOV ( ljob, matno, movedate, empno, starttime, used, unitcost ) values ( ?, ?, ?, '900000004', ?, ?, ? ) ' undef '26373' 'UPS' '2003-01-16 00:00:00.000' '00:26' 0 '1.000') thr#15d447c 1 -> prepare for DBD::ODBC::db (DBI::db=HASH(0x1ed0bf0)~INNER ' insert into BBINVMOV ( ljob, matno, movedate, empno, starttime, used, unitcost ) values ( ?, ?, ?, '900000004', ?, ?, ? ) ' undef) thr#15d447c dbih_setup_handle(DBI::st=HASH(0x1fdabb4)=>DBI::st=HASH(0x1fdadd0), DBD::ODBC::st, 1fdabc0, Null!) dbih_make_com(DBI::db=HASH(0x1ed0bf0), DBD::ODBC::st, 200) thr#15d447c dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), Err, DBI::db=HASH(0x1ed0bf0)) SCALAR(0x1cdd1dc) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), State, DBI::db=HASH(0x1ed0bf0)) SCALAR(0x1cdd224) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), Errstr, DBI::db=HASH(0x1ed0bf0)) SCALAR(0x1cdd200) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), Debug, DBI::db=HASH(0x1ed0bf0)) 5 (already defined) dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), FetchHashKeyName, DBI::db=HASH(0x1ed0bf0)) 'NAME' (already defined) dbih_setup_attrib(DBI::st=HASH(0x1fdadd0), HandleError, DBI::db=HASH(0x1ed0bf0)) undef (not defined) ignore named placeholders = 0 dbd_preparse scanned 6 distinct placeholders SQLPrepare returned 0 dbd_st_prepare'd sql f30881184 insert into BBINVMOV ( ljob, matno, movedate, empno, starttime, used, unitcost ) values ( ?, ?, ?, '900000004', ?, ?, ? ) 1 <- prepare= DBI::st=HASH(0x1fdabb4) at c:/Perl/site/lib/DBI.pm line 1212 via post_shipping.pl line 861 -> execute for DBD::ODBC::st (DBI::st=HASH(0x1fdabb4)~0x1fdadd0 '26373' 'UPS' '2003-01-16 00:00:00.000' '00:26' 0 '1.000') thr#15d447c bind 1 <== '26373' (attribs: ), type 0 bind 1 <== '26373' (size 5/6/0, ptype 5, otype 1, sqltype 0) bind 1 <== '26373' (len 5/5, null 0) SQLDescribeParam 1: SqlType=CHAR, ColDef=5 bind 1: CTy=1, STy=CHAR, CD=5, Sc=5, VM=5. bind 2 <== 'UPS' (attribs: ), type 0 bind 2 <== 'UPS' (size 3/4/0, ptype 5, otype 1, sqltype 0) bind 2 <== 'UPS' (len 3/3, null 0) SQLDescribeParam 2: SqlType=CHAR, ColDef=6 bind 2: CTy=1, STy=CHAR, CD=3, Sc=3, VM=3. bind 3 <== '2003-01-16 00:00:00.000' (attribs: ), type 0 bind 3 <== '2003-01-16 00:00:00.000' (size 23/24/0, ptype 5, otype 1, sqltype 0) bind 3 <== '2003-01-16 00:00:00.000' (len 23/23, null 0) SQLDescribeParam 3: SqlType=TIMESTAMP, ColDef=23 bind 3: CTy=1, STy=TIMESTAMP, CD=23, Sc=23, VM=23. bind 4 <== '00:26' (attribs: ), type 0 bind 4 <== '00:26' (size 5/6/0, ptype 4, otype 1, sqltype 0) bind 4 <== '00:26' (len 5/5, null 0) SQLDescribeParam 4: SqlType=CHAR, ColDef=5 bind 4: CTy=1, STy=CHAR, CD=5, Sc=5, VM=5. bind 5 <== '0' (attribs: ), type 0 bind 5 <== 0 (size 1/2/0, ptype 5, otype 1, sqltype 0) bind 5 <== '0' (len 1/1, null 0) SQLDescribeParam 5: SqlType=NUMERIC, ColDef=10 bind 5: CTy=1, STy=NUMERIC, CD=1, Sc=1, VM=1. bind 6 <== '1.000' (attribs: ), type 0 bind 6 <== '1.000' (size 5/6/0, ptype 4, otype 1, sqltype 0) bind 6 <== '1.000' (len 5/5, null 0) SQLDescribeParam 6: SqlType=NUMERIC, ColDef=12 bind 6: CTy=1, STy=NUMERIC, CD=5, Sc=5, VM=5. dbd_st_execute (outparams = 0)... dbd_st_execute (for hstmt 30881184 before)... dbd_error: err_rc=-1 rc=0 s/d/e: 30881184/30872360/30872192 dbd_error: SQL-22003 (native 0): [Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003) dbd_error: err_rc=-1 rc=0 s/d/e: 0/30872360/30872192 dbd_error: err_rc=-1 rc=0 s/d/e: 0/0/30872192 st_execute/SQLExecute error -1 recorded: [Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003)(DBD: st_execute/SQLExecute err=-1) !! ERROR: -1 '[Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003)(DBD: st_execute/SQLExecute err=-1)' <- execute= undef at c:/Perl/site/lib/DBI.pm line 1213 via post_shipping.pl line 861 <> DESTROY ignored for outer handle DBI::st=HASH(0x1fdabb4) (inner DBI::st=HASH(0x1fdadd0)) -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x1fdadd0)~INNER) thr#15d447c SQLFreeStmt called, returned 0. <- DESTROY= undef at c:/Perl/site/lib/DBD/ODBC.pm line 287 via post_shipping.pl line 372 dbih_clearcom 0x1fdabb4 (com 0x2037914, type 3) done. !! ERROR: -1 '[Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003)(DBD: st_execute/SQLExecute err=-1)' <- do= undef at post_shipping.pl line 372 via post_shipping.pl line 861 DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003)(DBD: st_execute/SQLExecute err=-1) at post_shipping.pl line 372. -> rollback for DBD::ODBC::db (DBI::db=HASH(0x1ed0c5c)~0x1ed0bf0) thr#15d447c <- rollback= 1 at post_shipping.pl line 1081 via post_shipping.pl line 895 -> disconnect for DBD::ODBC::db (DBI::db=HASH(0x1ed0c5c)~0x1ed0bf0) thr#15d447c ** auto-rollback due to disconnect without commit returned 1 <- disconnect= 1 at post_shipping.pl line 1082 via post_shipping.pl line 895 failed to post data: DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver]Numeric value out of range (SQL-22003)(DBD: st_execute/SQLExecute err=-1) at post_shipping.pl line 372. ...propagated at post_shipping.pl line 1094. aha! job number indirection from <EGARAY> to 26373 processing type: M processing material: UPS processing job: 26373 shipdate: 2003-01-16 00:00:00.000 [post_matl: 26373,UPS,2003-01-16 00:00:00.000,00:26,0,] -> DESTROY for DBD::ODBC::db (DBI::db=HASH(0x1ed0bf0)~INNER) thr#15d447c <- DESTROY= undef during global destruction