Any chance you could add:
use DBD::ODBC;
DBI->trace(DBD::ODBC-
Show quoted text>parse_trace_flags('odbcconnection|odbcunicode|15'));
to the start of the script and send me the output? Even when I ignore
DBD::ODBC and simply prepare your SQL and then call SQLDescribeParam on
the first parameter I get either:
SQLDescribeParam:
In: StatementHandle = 0x008918E0,
ParameterNumber = 1, DataTypePtr = 0x0008CF90, ParameterSizePtr =
0x000A4530, DecimalDigits = 0x00090D90,
NullablePtr = 0x000AD2E8
Return: SQL_ERROR=-1
Out: *DataTypePtr = <unmodified>, *ParameterSizePtr =
<unmodified>, *DecimalDigits = <unmodified>, *NullablePtr = <unmodified>
Errors All:
szSqlState = "07009", *pfNativeError = 0, *pcbErrorMsg = 59
szErrorMsg = "[Microsoft][ODBC SQL Server Driver]Invalid Descriptor
Index"
szSqlState = "42000", *pfNativeError = 0, *pcbErrorMsg = 67
szErrorMsg = "[Microsoft][ODBC SQL Server Driver]Syntax error or access
violation"
or
SQLDescribeParam:
In: StatementHandle = 0x008918E0,
ParameterNumber = 1, DataTypePtr = 0x00085890, ParameterSizePtr =
0x0008CF90, DecimalDigits = 0x000A4530, NullablePtr = 0x000AD2E8
Return: SQL_ERROR=-1
Out: *DataTypePtr = <unmodified>, *ParameterSizePtr =
<unmodified>, *DecimalDigits = <unmodified>, *NullablePtr = <unmodified>
Errors All:
szSqlState = "07009", *pfNativeError = 0, *pcbErrorMsg = 54
szErrorMsg = "[Microsoft][SQL Native Client]Invalid Descriptor Index"
szSqlState = "42000", *pfNativeError = 0, *pcbErrorMsg = 92
szErrorMsg = "[Microsoft][SQL Native Client]Syntax error, permission
violation, or other nonspecific error"
depending on which driver I use so it would appear I cannot call
SQLDescribeParam on this SQL!
Martin
--
Martin J. Evans
Wetherby, UK