hoangduit / h2sharp

Automatically exported from code.google.com/p/h2sharp
0 stars 0 forks source link

Indexer property does not convert returned values #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Assuming "num_col" is an appropriate numeric column in the database, the 
following throws a FormatException:

Convert.ToInt32(datareader["num_col"])

What is the expected output? What do you see instead?

With the above example, the expected behavior is for Convert.ToInt32 to return 
an integer.  Instead it throws a FormatException.  Generally speaking, the 
indexer property should behave the same as GetValue(int), which converts boxed 
java types to CLR types.

Original issue reported on code.google.com by acton...@gmail.com on 10 Jul 2013 at 7:07