Thank you for the suggestion, but I get this error when trying:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.Data.EntityException: The underlying provider failed on Open. --->
System.ArgumentException: The path is not of a legal form.
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32
maxPathLength)
at System.IO.Path.GetFullPath(String path)
at System.Data.SQLite.SQLiteConnection.ExpandFileName(String sourceFile)
in c:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.82.0.BETA\System.Data.SQLite\SQLiteCon
nection.cs:line 1789
...
The connectionstring I built like this:
EntityConnectionStringBuilder con = new
EntityConnectionStringBuilder();
con.Metadata =
"res://*/SQLiteModel.csdl|res://*/SQLiteModel.ssdl|res://*/SQLiteModel.msl";
con.Provider = "System.Data.SQLite";
con.ProviderConnectionString = "data
source=FullUri::memory:?cache=shared;";
Also tried:
con.ProviderConnectionString = "data
source=FullUri::memory:?cache=shared";
con.ProviderConnectionString = "data
source=FullUri::memory:;cache=shared;";
con.ProviderConnectionString = "data
source=Uri::memory:?cache=shared";
con.ProviderConnectionString = "data
source=Uri::memory:;cache=shared";
con.ProviderConnectionString = "data
source=:memory:?cache=shared";
All resulting in the same error. And of course:
con.ProviderConnectionString = "data
source=:memory:;cache=shared"; // new db is access on each open; I do have
one link open to the first one created.
Not sure what to try next...
Also, 1.0.82.0.trunk is not working well when installed. In the Server
Brower in VS2010, a path to a file cannot be entered if it contains a space.
(illegal filename error or something like that). Just thought I'd mention
it.
--
Bernhard
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Joe Mistachkin
Sent: 24. juli 2012 18:46
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll
Bernhard Mogens Ege wrote:
>
> Has _anyone_ made ":memory:;cache=shared" work in C#/System.Data.SQLite?
>
I think you want "FullUri=file::memory:?cache=shared;" instead (using the
code on trunk).
--
Joe Mistachkin
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users