Avoid using bind_param with SQL_DECIMAL - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

When using the bind_param method call with decimal fields, you should not explicitly specify SQL_DECIMAL as the parameter bind type. If you do this, and the parameter value has a fractional digital part, the factional part changes to 0 after applying bind_param. The DBD::ODBC bind_param implementation makes this conversion when specifying SQL_DECIMAL/SQL_NUMERIC as the parameter bind type. Note that bind_param works fine when SQL_DECIMAL is not explicitly specified, so you should avoid this when passing decimal fields.