Hello!

I was trying to use the new implementation of Sqlite provider
available now on mono, but I had  several problems with it...
First of all it failed to perform BindParameters properly when I tried
to use named parameters. After some debugging it appeared that the
names of parameters are improperly read from data returned by sqlite
native function. The problem was the usage of
Marshal.PtrToStrAuto   in SQLiteConvert.cs
function, which didn't properly decode strings on Windows system.
I patched the implementation with the way it is done in old
Mono.Data.SqliteClient - the implementation isn't very elegant, since
it adds usage of unsafe pointer, but it worked well in the old
implementation. If anybody knows a better way to convert unmanaged
utf8 strings into managed string, without adding dependency on other
libraries, then we could do this better.

The second problem I encounter with new implementation is that it
seems to deadlock when there are two threads using the same
data-base... I use separate connections for each thread, but it looks
like when I perform data-modify operations from both, it locks totally
(concurrent reads seems to be ok). If anyone has some suggestions,
please let me know. For now I will stick with old implementation.

--
Kamil Skalski
http://nazgul.omega.pl

Attachment: sqlite_utf.diff
Description: Binary data

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to