Pdo::param_Str Issue With Decimal

I have a decimal(18, 2) field in MSSQL. I am trying to insert/update records in the table by binding the following param:

I am getting a strange error saying:

This is a bit puzzling as it is working in a similar environment, but not in this particular case. Could it be that I’m using PARAM_STR that is causing this conversion problem? What would be the correct one to use for DECIMAL? Or is it some other input that I’m missing out on that could be causing this?

pdo param decimal

PARAM_DECIMAL does not exist in Yii as far as I can see. It didn’t show up as an alternative, and when I used it anyway I got an error.

The problem was solved by inserting zero "0" instead of blank "" . It seems like the decimal field cannot accept a blank field. Is there any way to get a blank value in? It works with Float but not with Decimal to insert a blank value.