On 27 Apr 2014, at 1:21pm, Matthijs ter Woord <matthijsterwo...@gmail.com> 
wrote:

> I'm trying to have my DbContext connect to a sqlite database specified by
> the end user.
> The end user is given a File Open dialog, and then the application should
> connect to it.
> 
> The DbContext has a constructor taking a connection string, but I cannot
> get it to work.

Somewhere along this line you should figure out what's wrong:

Hack your app to hardware the filepath to ignore whatever FileOpen returns and 
open something in a path you type yourself.  Does it work ?

Dump the connection string as text (or use a debugger to see what's in the 
string).  Dump both the contents and the length and check to see there are no 
invisible characters in there.

Check to see the string looks like it's in the right format.  Don't forget 
whatever stuff SQLite likes to find at the beginning of the string.  You might 
have to add something yourself.

Make sure the string is in the right character set.  I used to see problems 
with people providing a file path with its characters in an unexpected codepage.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to