[Mono-dev] [PATCH] SqliteDataReader should handle getting field type for null values
Joshua Tauberer
tauberer at for.net
Tue Mar 7 16:46:58 EST 2006
Kamil Skalski wrote:
> I encountered NullReferenceException from SqliteDataReader, when I
> have a query like
>
> select a, b, NULL, c, FROM xxx
>
> and I try to use reader.GetFieldType (2) for fetching info about
> columns (actually DataAdapter from MS.NET calls this method for every
> column in result)
>
> I attach a patch (test included) for fixing this. It works great in my
> app and it would be nice to have it official :)
>
> May I commit?
Please do!
I'm wondering, tho, if wherever the adapter would return null, it should
return a DBNull instead? Do other data adapters ever return 'null' values?
--
- Joshua Tauberer
http://taubz.for.net
"Unfortunately, we're having this discussion. It's too bad,
because guess who listens to the discussion: the enemy."
More information about the Mono-devel-list
mailing list