sgreenst

sgreenst

  • NA
  • 10
  • 0

simple problem with datareader

Nov 12 2003 8:51 AM
I've got this wierd issue: An ODBC driver to a legacy system sticks a '$' sign in front of the number on the Price column. I use an ODBC query tester to check my SQL statements and I can see this happening. According to the reader.GetSchemaTable, this column is of decimal type. However any type of reader.GetValue, .GetDecimal, or ToString method I try causes an exception because of incorrect format. It rightly sees this typed as decimal, but bonks on the dollar sign. So the question is: is there an 'agnostic' way to read this data so that I can strip the '$' out? Will gladly return help if anyone can assist me. TIA!

Answers (1)