[Mono-list] Bug (?) in SqliteDataReader

Nikki Locke nikki at trumphurst.com
Fri May 19 06:30:05 EDT 2006

Jonathan Gilbert wrote:
> What about making SQLite type "safety" an optional feature, configured in 
> the connection string, so that when enabled, the GetSchemaTable method 
> returns the types asreported by SQLite, but by default (with a plain, 
> standard connection string) it returns all columns as 'String'? This is 
> especilaly attractive if there is some way to indicate this in the 
> connection string that other providers (e.g. Finisar) will simply ignore. 
> That way, if you know & trust the database, you can enable the type 
> conversions, but with the knowledge that the database could be "corrupt" 
> w.r.t. the column types, resulting in exceptions that are outside of your 
> control. If you don't trust the database, then you can simply get strings 
> back and go from there :-) 

That is an excellent idea. Unfortunately, the existing library will not cope 
with arbitrary strings in DateTime fields - the only additional feature it 
allows is floating point numbers, which seems a bit pointless to me.

> Of course, Mono.Data.SqliteClient uses "URI" in place of "Data Source", but 
> perhaps "Data Source" could be added to Mono.Data.SqliteClient; then, the 
> above connection string would work just fine in both Finisar.Sqlite and 
> Mono.Data.SqliteClient :-) 

In a similar vein, it would be nice if Mono.Data.Sqlite had trivial subclasses 
of all the public classes called "SQLite*" instead of "Sqlite*", thus making it 
even more compatible with Finisar (without breaking any existing code).

Nikki Locke, Trumphurst Ltd.      PC & Unix consultancy & programming

More information about the Mono-list mailing list