[Mono-list] Mono.Data.SqliteClient fixes

Joshua Tauberer tauberer at for.net
Mon Jan 2 14:39:45 EST 2006

I've gone ahead and committed a bunch of fixes for Sqlite client, 

Julien Sobrier wrote on Dec. 13:
> I opened the bug 76986.
> With sqlite 3 and  Mono.Data.SqliteClient, GetDataTypeName always return
> "text", even for fields declared as Integer.

This is fixed.  (For reference, Sqlite 2 treats everything as strings so 
it's only possible with ver 3.)

Duncan McQueen wrote on Dec. 3:
 > The database is a version 3 table.  However, the datetime values
 > returned are not returned as datetime values in the Schema.  The
 > alternative Finisar.SQLite implementation does do this correctly.

For Sqlite 3, INT and INTEGER columns are now returned as ints (rather 
than longs), and DATE and DATETIME columns are now returned as DateTime 
structs rather than strings (using DateTime.Parse).  But with Sqlite the 
best thing to do is probably to avoid casting GetValue() and stick with 
GetInt32, etc.

Daniel Drake wrote on Nov. 29:
 > The sqlite API can return BUSY in some locking-related situations, but
 > this wasn't being handled appropriately, and strange things would happen.

SqliteBusyException is now thrown whenever business is encountered, but 
I couldn't test this because I don't know how to lock a table...

Your patch also had changes to SqliteDataReader so that the entire 
result set didn't have to be held in memory -- that would still be nice 
to get in (although your patch probably won't work anymore).

Ecmel Ercan wrote on Nov. 29:
 > I am trying to use the Mono.Data.SqliteClient with sqlite3 but can not
 > execute more than one SQL command in a single CommandText:

This had to do with preparing all the statements first and then 
executing them later, which isn't possible when tables are 
created/modified.  Now the statements are prepared right before they're 
executed, fixing this.

There was also a bugzilla entry about 
SqliteConnection.BeginTransaction(IsolationLevel) returning null instead 
of throwing an exception.

It'd be great if anyone using the Sqlite client could try it out now 
since I had to muck with it quite a bit to fix the issue Ecmel raised.

- Joshua Tauberer


** Nothing Unreal Exists **

More information about the Mono-list mailing list