mrpostiga / h2sharp

H2Sharp is an Ado.Net wrapper for the H2 Database Engine written in C#.
1 stars 3 forks source link

Indexer property does not convert returned values #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 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