Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting string to numeric
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01544642
Message ID:
01544648
Views:
29
>Yet another question on setting up values to parameters to be passed to a sql server stored procedure.
>
>Here is an example.
>One of the parameters of the stored procedure is of type number:
>
>
>@nTest numeric(10,2) OUTPUT
>--- set value
>set @nTest = 3333.33
>
>
>Then in the C# code when creating the parameter I do the following
>
>param.DbType = System.Data.DbType.Decimal;
>param.Value = 0;
>param.Direction.InputOutput;
>
>
>But after I call the oCommand.ExecuteNonQuery() I get error
>
>
>Error converting data type numeric to numeric
>
>
>What am I missing?
>
>TIA.
>
>UPDATE: The title of the thread is wrong. It should have said, Using Decimal type parameter.

Shouldn't be SqlDbType.Decimal?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform