I'm pulling SQL data into a dataset to be used to perform some math against.
I asked this question earlier, but the answer someone gave me left me with
further questions. The SQL data is stored as decimal, and the local
variables I create to store them in is float. Fine. When I iterate through a
datarow, I am assigning each cell to a variable. At least, I want to. I
always get the message cannot implicitly convert type 'object' to type
'decimal' (or 'float'). Does that mean when I call from SQL it doesn't
retain the same variable type? I've been getting around the problem by
boxing everything ToString then parsing, but jesus H, that's adding a
truckload of extra code. Is there a simpler way to do it my limited brain is
failing to comprehend? The other guy suggested if SQL stores it as type
decimal to assign the datarow cells to a decimal variable type....same
implicit error. Am I misunderstanding how C# pulls SQL data?
--
Steve Wasser
http://xdissent.com
the journal of contrarian social discourse and neurotic opinion