Hi All
I'm trying to connect to MSSQL 2000 to execute a number of stored procedures to return values to my IVR system, I have two stored procedures that work, and one that works from the ms query analyser, but when I run the perl script Here is the output DBI::st=HASH(0x9816204) trace level set to 9 in DBI 1.40-ithread (pid 5721) -> execute for DBD::ODBC::st (DBI::st=HASH(0x9816210)~0x9816204) thr#967d008 dbd_st_execute (outparams = 0)... dbd_st_execute (for hstmt 159585152 before)... dbd_st_execute (for hstmt 159585152 after, rc = 1)... dbd_error: err_rc=1 rc=0 s/d/e: 159585152/159476272/158729136 dbd_error: SQL-42000 (native 257): [DataDirect][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query. (SQL-42000) dbd_error: err_rc=1 rc=0 s/d/e: 0/159476272/158729136 dbd_error: err_rc=1 rc=0 s/d/e: 0/0/158729136 dbd_st_execute getting row count dbd_st_execute got row count -1 dbd_describe 159585152 getting num fields dbd_error: err_rc=-1 rc=0 s/d/e: 159585152/159476272/158729136 dbd_error: SQL-24000 (native 0): [DataDirect][ODBC SQL Server Driver]Invalid cursor state (SQL-24000) dbd_error: err_rc=-1 rc=0 s/d/e: 0/159476272/158729136 dbd_error: err_rc=-1 rc=0 s/d/e: 0/0/158729136 dbd_describe/SQLNumResultCols error -1 recorded: [DataDirect][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols err=-1) dbd_describe failed, dbd_st_execute #1...! !! ERROR: -1 '[DataDirect][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols err=-1)' <- execute= undef at II_IVRauthorisemandate.agi line 35 DBD::ODBC::st execute failed: [DataDirect][ODBC SQL Server Driver]Invalid cursor state (SQL-24000)(DBD: dbd_describe/SQLNumResultCols err=-1) at II_IVRauthorisemandate.agi line 35, <STDIN> line 1. !! ERROR: -1 CLEARED by call to fetchrow_hashref method -> fetchrow_hashref in DBD::_::st for DBD::ODBC::st (DBI::st=HASH(0x9816210)~0x9816204) thr#967d008 >> FETCH DISPATCH (DBI::st=HASH(0x9816204) rc2/1 @2 g0 ima404 pid#5721) at II_IVRauthorisemandate.agi line 37 1 -> FETCH for DBD::ODBC::st (DBI::st=HASH(0x9816204)~INNER 'NAME') thr#967d008 dbd_describe 159585152 getting num fields dbd_error: err_rc=-1 rc=0 s/d/e: 159585152/159476272/158729136 dbd_error: SQL-42000 (native 257): [DataDirect][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query. (SQL-42000) dbd_error: err_rc=-1 rc=0 s/d/e: 0/159476272/158729136 dbd_error: err_rc=-1 rc=0 s/d/e: 0/0/158729136 dbd_describe/SQLNumResultCols error -1 recorded: [DataDirect][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query. (SQL-42000)(DBD: dbd_describe/SQLNumResultCols err=-1) dbd_st_FETCH_attrib (NAME) needed query description, but failed Describe failed during DBI::st=HASH(0x9816204)->FETCH(NAME,0) at II_IVRauthorisemandate.agi line 37, <STDIN> line 1. error: -1 '[DataDirect][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query. (SQL-42000)(DBD: dbd_describe/SQLNumResultCols err=-1)' 1 <- FETCH= undef at II_IVRauthorisemandate.agi line 37 >> fetch DISPATCH (DBI::st=HASH(0x9816204) rc2/1 @1 g0 ima0 pid#5721) at II_IVRauthorisemandate.agi line 37 !! ERROR: -1 CLEARED by call to fetch method 1 -> fetch for DBD::ODBC::st (DBI::st=HASH(0x9816204)~INNER) thr#967d008 dbd_error: err_rc=-1 rc=0 s/d/e: 159585152/159476272/158729136 dbd_error: err_rc=-1 rc=0 s/d/e: 0/159476272/158729136 dbd_error: err_rc=-1 rc=0 s/d/e: 0/0/158729136 no select statement currently executing error -1 recorded: (DBD: no select statement currently executing err=-1) !! ERROR: -1 '(DBD: no select statement currently executing err=-1)' 1 <- fetch= undef row-1 at II_IVRauthorisemandate.agi line 37 !! ERROR: -1 '(DBD: no select statement currently executing err=-1)' <- fetchrow_hashref= undef row-1 at II_IVRauthorisemandate.agi line 37 DBD::ODBC::st fetchrow_hashref failed: (DBD: no select statement currently executing err=-1) at II_IVRauthorisemandate.agi line 37, <STDIN> line 1. Use of uninitialized value in concatenation (.) or string at II_IVRauthorisemandate.agi line 44, <STDIN> line 1. Use of uninitialized value in concatenation (.) or string at II_IVRauthorisemandate.agi line 45, <STDIN> line 1. -> DESTROY for DBD::ODBC::st (DBI::st=HASH(0x9816204)~INNER) thr#967d008 SQLFreeStmt called, returned 0. error: -1 '(DBD: no select statement currently executing err=-1)' <- DESTROY= undef Now I think the "Implicit conversion from data type varchar to money is not allowed" error message is a red herring, because the stored procedure works fine through the query analyser, and the only conversion to from varchar to money is handled correctly in the stored procedure, Thnaks in advance for your help Regards, Robb