c# - SqlCommand Parameter not recognized -


why does

        scins.parameters.add(new sqlparameter("@v30", 0.00m)); 

lead "@v30 undefined" error,

        decimal dzero = 0.00m;         scins.parameters.add(new sqlparameter("@v30", dzero)); 

works ok?

sqlparamter has 2 different overloads 2 parameters, first being string , second being sqldbtype or object.

in first case when 0.00m gets passed in gets converted int64, , in second case because value passed in of type decimal used sqldbtype.decimal.

check out link

update :
found stackoverflow question talks , has detailed answer. :)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -