[Mono-list] Bug (?) in SqliteDataReader

Joshua Tauberer tauberer at for.net
Mon May 15 10:58:13 EDT 2006


> Joshua Tauberer wrote:
>> Nikki Locke wrote: 
>> > I use the Sqlite database under both Windows and Linux. Under Windows, if I 
>> > have a date or datetime field, then row data returned from a query on that 
>> > field is returned as a DateTime. Under Linux, it is returned as a string. 
>>  
>> Are you sure you have the same version of mono (esp. 
>> Mono.Data.SqliteClient) *and* Sqlite (the native library) on both 
>> systems?  
> 
> No. The Windows version is Microsoft, not Mono.
> 
> CentOS comes with sqlite 3 installed, and that is what I have been using. 

Ok.  Is Sqlite2 present also, tho, on either platform?  The data adapter
defaults to Sqlite2 if it's present.  You could try adding "version=3"
to the conn string on both platforms (esp. Linux).  And what version of
Mono?

>> try to turn the value back into a DateTime.  
> 
> Where does it try to do that? I can't find the code (and I would really like to, 
> so I can perhaps make it work more rationally, without recompiling the library).

See:
mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteDataReader.cs:

http://svn.myrealbox.com/viewcvs/trunk/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteDataReader.cs?rev=57667&view=auto

> I enclose a test program as an attachment (please let me know if it doesn't get 
> through the list).

Thunderbird wouldn't render your email at all, actually, at least for me.

-- 
- 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-list mailing list