[Mono-list] Single .dll targeted at multi platform but using sqlite, possible?

matthieu Barthélemy bonsouere at gmail.com
Wed Aug 22 22:27:52 UTC 2012


On Thu, Aug 23, 2012 at 12:14 AM, KeithBoynton <
keithboynton at flaredesign.co.uk> wrote:

> Gosh it's a minefield. So I've downloaded mono for windows, attached the
> Mono.Data.Sqlite.dll to my Visual Studio 2010 project.
>
> Sure enough all seems good, until I run and I get:
>
> The type initializer for 'Mono.Data.Sqlite.SqliteConvert' threw an
> exception.
> at Mono.Data.Sqlite.SqliteConvert.Split(String source, Char separator)
>    at Mono.Data.Sqlite.SqliteConnection.ParseConnectionString(String
> connectionString)
>    at Mono.Data.Sqlite.SqliteConnection.Open()
> System.ArgumentException: Value does not fall within the expected range.
>    at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array
> array, RuntimeFieldHandle fldHandle)
>    at Mono.Data.Sqlite.SqliteConvert..cctor()
>
> May I ask what connection string you use, I seem to have tried all manner
> of
> formats and none seem to work.
>
Sure, here is the syntax I use for the *native* dll:
ConnectionString = "Version=3,URI=file:taskindex.db";

However, I think I've never tried to use Mono.Data.Sqlite on windows, only
on Mono/Unix, though I don't know if your problem could be related to the
framework or the underlying OS.
Have you tried to run your app with its actual connection string under mono
on Linux?





>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Single-dll-targeted-at-multi-platform-but-using-sqlite-possible-tp4656335p4656356.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20120823/badeefb5/attachment.html>


More information about the Mono-list mailing list