I'm trying to port my websites to the DAAB and I have a question: how do you get the output of a SQL Server DECIMAL(8,2) datatype in the AddOutParameter() method? Here's my original ADO.NET code:
SqlParameter pPrice = new SqlParameter("@Price", SqlDbType.Decimal);
pPrice.Precision = 8;
pPrice.Scale = 2;
pPrice.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(pPrice);
Which is passed to a SqlCommand named "myCommand" and executed blah blah blah. How can you do the same thing in the DAAB? The DAAB does not include precision and scale in any of the AddOutParameter() method overrides.
One note: I write for SQL Server and do not/will not be writing this code for any other system (if it makes any difference).
SqlDatabase has a generic AddParameter() method that does contain a precision/scale but it also includes other things that don't matter to me (or don't make sense when using an OUTPUT param) such as DataRowVersion, SourceColumn, and value. It just doesn't seem to fit what I need: an output parameter for which I can define the precision and scale of a SQL Decimal datatype.
Help!
===========================
Check out my SQL Server site - http://www.learnsqlserver.com/
SQL Server Code Samples:
http://forums.learnsqlserver.com/CodeSamples.aspx
===========================