S
Steve Richter
I have having a hard time getting the numeric columns in my sql tables
to map correctly to .NET. I have a price and a cost column in a
table. What is the most .NET friendly way to declare those columns?
cmd = new SqlCommand("CREATE TABLE ItemMaster ( " +
"ItemId INT PRIMARY KEY," +
"ItemDesc varChar(80), " +
"Price Numeric(7,2), " +
"Cost Numeric(7,2)",
conn);
new SqlParameter( "@Price", SqlDbType.Money ) ; // ??????
System.Decimal cost ;
SqlDataReader reader ;
cost = reader.GetSqlMoney(3) ; // ?????????????????
thanks,
-Steve
to map correctly to .NET. I have a price and a cost column in a
table. What is the most .NET friendly way to declare those columns?
cmd = new SqlCommand("CREATE TABLE ItemMaster ( " +
"ItemId INT PRIMARY KEY," +
"ItemDesc varChar(80), " +
"Price Numeric(7,2), " +
"Cost Numeric(7,2)",
conn);
new SqlParameter( "@Price", SqlDbType.Money ) ; // ??????
System.Decimal cost ;
SqlDataReader reader ;
cost = reader.GetSqlMoney(3) ; // ?????????????????
thanks,
-Steve