I'm using SQLPrepare/SQLExecute to invoke a stored procedure (against
SQLServer 7). However, I have been unable to figure out how to set the
scale of my NUMERIC arguments. In the database they are set at 18,6.
The scale always defaults to 0, truncating my numbers to whole numbers.
I've tried using
SQLSetDescField(desc, index, SQL_DESC_SCALE, (SQLPOINTER) 6, 0);
to set the scale. I've this with desc set as both
SQLGetStmtAttr(stmt, SQL_ATTR_IMP_PARAM_DESC, &desc, 0, NULL);
SQLGetStmtAttr(stmt, SQL_ATTR_APP_PARAM_DESC, &desc, 0, NULL);
Neither seem to affect data. When using SQL_ATTR_APP_PARAM_DESC I get
invalid string length errors. I guess this argument is applied to all
arguments (my sproc has 40+ arguments of different types).
Has anyone been able to get this to work through ODBC?
Sent via Deja.com http://www.deja.com/
Before you buy.