Getting "unable to open database file" with this minimal connection string

With the following in my C# Visual Studio .NET Core Winforms app, I'm getting "unable to open database file":

using System.Data.SQLite;
. . .
string cs = "Data Source=\F4FDataSQLite_SingleTable.db;";
using var con = new SQLiteConnection(cs);

My SQLite file resides in the root of the project.

I don't want to use the full file path (C:\Users\bclay\source\repos\F4F_Core\F4F_Core\F4FDataSQLite_SingleTable.db), because that's not going to be a valid path for anybody but myself.

Is there something wrong with my connection string that is causing this error message?

0 answers