+2  A: 

Your connection string seems correct to me. Are you sure the SQLite ADO.NET provider is properly installed on the server ? Open your machine.config file, and check if there is an entry for System.Data.SQLite in the DbProviderFactories section

A link to a good resource about how to construct EF connection strings would be very helpful too!

Basically, you have to specify : - the model metadata (the parts with "res://...") - the store provider ("System.Data.SQLite" in your case) - the store connection string, which varies depending on which provider you use

The easiest way to construct a connection string dynamically is to use the EntityConnectionStringBuilder class, along with the connection string builder of your store provider.

Thomas Levesque
I edited my question to answer your question
Dabblernl
What's the exact error message you get ? PS : I updated my answer to address your question about the connection string.
Thomas Levesque
The errormessage is: "The underlying provider failed on Open". The stack trace points to the first line in code where the database is actually accessed.
Dabblernl
and what is the InnerException ?
Thomas Levesque
The inner exception gave the clue, it stated that *a null was returned after calling the 'GetService' method. This pointed me to a post that explained the solution below.
Dabblernl
+1  A: 

I agree with Thomas, the conn. string looks OK to me. But if you are looking for information about building connection strings, check this out:

echo
A: 

try double slashes for path ??

G:\\PMPersistence\\xPMDb.s3db

Also specifying your assembly name instead of * would help when the application is looking for ssdl,csdl,msl

res://YourAssemblyName(without the dll extn)/PM_EDM.ssdl|
ram
+1  A: 

The connection string was indeed OK. The problem was that you have to deploy both the system.data.sqlite.dll and the system.data.sqlite.linq.dll to the Bin folder of the web service that hosts the database connection.

Dabblernl