asp.net - Decimal value become another value -
why when pass parameter sqldatasource parameters see correct defaultvalue incorrect parameter value? don't know difference between these 2 types of parameters, think default value interest. want send in db value 7.5 , not 75, me please?
parameter prm_prezzo = new parameter("cc_prezzo", dbtype.decimal, newvalues["prezzo"].tostring().replace(",", "."));
solved expert's think because it's not clear me:
the first instruction post had replace of "," "." because without replace "," escape stored procedure
doing so...
parameter prm_prezzo = new parameter("cc_prezzo", dbtype.decimal); prm_prezzo.defaultvalue = newvalues["prezzo"].tostring();
...i have correct value , stored procedure not escaped...
but don't undestand difference between 2 methods :-0
Comments
Post a Comment