A
Adam The Generic
Hi All,
In c#, I use a decimal out DbParameter for a Sql Server stored procedure.
I create parameter like that
---------------------------------
DbParameter prm = comm.CreateParameter();
prm.ParameterName = "@Price";
prm.DbType = DbType.Decimal;
prm.Direction = ParameterDirection.Output;
comm.Parameters.Add(prm);
---------------------------------
and getting value to a variable
-------------------------------------
decimal.TryParse(comm.Parameters["@Price"].Value.ToString(), out
this.ProdPrice);
-------------------------------------
But the value is allways rounded.
If i call same SP from Sql Server Management Studio, i get this out
parameter properly with it's precision
There is not a precision or scale properties on DbParameter.
And i have to use System.Data.Common namespace for fetching the data
How can i being able to retieve decimal value with its full precision
Thanks in advance...
In c#, I use a decimal out DbParameter for a Sql Server stored procedure.
I create parameter like that
---------------------------------
DbParameter prm = comm.CreateParameter();
prm.ParameterName = "@Price";
prm.DbType = DbType.Decimal;
prm.Direction = ParameterDirection.Output;
comm.Parameters.Add(prm);
---------------------------------
and getting value to a variable
-------------------------------------
decimal.TryParse(comm.Parameters["@Price"].Value.ToString(), out
this.ProdPrice);
-------------------------------------
But the value is allways rounded.
If i call same SP from Sql Server Management Studio, i get this out
parameter properly with it's precision
There is not a precision or scale properties on DbParameter.
And i have to use System.Data.Common namespace for fetching the data
How can i being able to retieve decimal value with its full precision
Thanks in advance...