asp.net - How to pass string value to storedp procedure that want decimal value -


i have problem , don't know how solve:

-in .aspx page sqldatasource calls stored procedure -i pass parameter in code-behind -i have pass string value parameter decimal in stored procedure -running conversion error, do?

//code behind parameter prm_price = new parameter("cc_price", dbtype.decimal, newvalues["price"].tostring());  sqldatasource.insertparameters.add(prm_price); 

-

//stored procedure @cc_prezzo decimal(15,3), 

well have cast string before sending it. if decimal can cast in float before sending , when receive have recast in string.

i don't know langages using that

sqldatasource.insertparameters.add(float.parse(prm_price)); 

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 -