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(",", ".")); 

enter image description here

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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -