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

matthieu Barthélemy bonsouere at gmail.com
Thu Aug 23 19:24:19 UTC 2012


A quick answer just to check a few things
-I use ',' to separate connection string elements, not ';'
-I use the "URI=" scheme because I think I remember that the "data source="
one didn't work for me.
-If I were you, I would have tried the same code on mono+Linux, just to see
if it makes any difference.
-Are there any special/weird chars inside your "inputFile" db name?




On Thu, Aug 23, 2012 at 8:53 PM, KeithBoynton <
keithboynton at flaredesign.co.uk> wrote:

>
>  matthieu Barthélemy wrote
> >
> > Can you post the code (of the part of it) that throws this error?
> >
>
> Sure, here's the bit that appears to be causing the problem....
>
> public DatabaseManager(String inputFile)
>         {
>             _dbConnectionString = String.Format("Data
> Source={0};Version=3;", inputFile);
>             LogWriter.Debug("Connecting to database [" +
> _dbConnectionString
> + "]");
>             _databaseConnection = new
> SqliteConnection(_dbConnectionString);
>             _databaseConnection.Open();
>         }
>
>
> Here's what get's output by that log line..
> Connecting to database [Data Source=data.db;Version=3;]
>
>
> For the record here's the combination of connection strings I've tried...
> _dbConnectionString = String.Format("Data Source={0}", inputFile);
> _dbConnectionString = String.Format("Data Source={0};Version=3",
> inputFile);
> _dbConnectionString = String.Format("Data Source={0};", inputFile);
> _dbConnectionString = String.Format("Data Source={0};Version=3;",
> inputFile);
> _dbConnectionString = String.Format("Data Source={0};Version=3;New=True;",
> inputFile);
> _dbConnectionString = String.Format("URI=file:{0};", inputFile);
> _dbConnectionString = String.Format("URI=file:{0};Version=3;", inputFile);
> _dbConnectionString = String.Format("URI={0};", inputFile);
> _dbConnectionString = String.Format("URI={0};Version=3;", inputFile);
>
> I'll be honest I'm flumoxed !
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Single-dll-targeted-at-multi-platform-but-using-sqlite-possible-tp4656335p4656369.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/6098b182/attachment.html>


More information about the Mono-list mailing list