askbook / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

SqliteDataReader.GetBoolean(int i) fails #173

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SqliteDataReader.GetBoolean(int i) throws an exception.

((object[]) rows[current_row])[i] is string as "0" or "1"
Thus, System.Convert.ToBoolean cannot convert the value.

It should be as:

int result = Convert.ToInt32(((object[])rows[current_row])[i]);
return Convert.ToBoolean(result);

You can pull the corrected version from:
https://code.google.com/r/uygarraf-csharp-sqlite-bugfix/

Original issue reported on code.google.com by uygar.raf@gmail.com on 25 Nov 2012 at 4:01

GoogleCodeExporter commented 8 years ago

Original comment by noah.hart@gmail.com on 25 Nov 2012 at 3:00

GoogleCodeExporter commented 8 years ago

Original comment by uygar.raf@gmail.com on 25 Nov 2012 at 3:32

GoogleCodeExporter commented 8 years ago
#14ba22d62480

Original comment by uygar.raf@gmail.com on 25 Nov 2012 at 3:53