I'm attempting to connect with a sqllite db from having a c# application. I have not labored with SQLLite before.

var connectionString = @"data source='C:\TestData\StressData.s3db'";
            connection = new SQLiteConnection(connectionString);
            connection.Open();

After i make an effort to open the bond I recieve the next exception:

System.NotSupportedException: The given path's format is not supported.
   at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
   at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)

What shall we be held doing wrong?

Thanks..

Nick

Update:

I transformed 'data source' to 'DataSource' as recommended in my experience. Now I get a new error:

After altering i customize the error: System.ArgumentException: Databases can't be empty. Use :memory: to spread out an in-memory database at System.Data.SQLite.SQLiteConnection.Open()

Anymore suggestions?

First got it..

"data source=c:\TestData\StressData.s3db; Version=3;"

Appears like the 'Version' attribute isn't optional. Interesting the .Internet provider doesn't show this within the designer property window.

Check out the System.Data.SQLite open source ADO.NET provider. Pretty nicely completed with good good examples. I personally use it experimenting interoperability between my Ruby and C# stuff.

You have to download and employ System.Data.SQLite.

Based on this, data source ought to be DataSource