sgreenst

sgreenst

  • NA
  • 10
  • 0

simple datareader issue (I hope)

Nov 12 2003 7:56 AM
Would be most grateful for any help on this issue!! Datareader is working great, but have one small issue when using against a legacy database. In one table, there is a Price column, and the ODBC driver returns the data type of decimal. So far, so good, but here's the catch: the driver (I can only assume) sticks a '$' in front of the value. If I use ODBCView (query tester) against the data source, this is what I see "$ 100.00". I cannot seem to find a way to use the reader to get this value in a 'raw' fashion so that I could convert it. I have tried ever combination of: myreader.GetValue(n) myreader.GetDecimal(n).ToString() and all combinations/permutations thereof. MyReader.GetSchemaTable tells me it's decimal and 13 chars long. Anybody have an idea what to try next? TIA!

Answers (2)