sqlite データベースがあり、データベースのパスワードを使用して C# プログラムから接続したいと考えています。私はNavicatを使用しており、パスワード「test」で暗号化データベースファイルを設定し、コードで私の接続文字列は次のとおりです。
_connection = new SQLiteConnection("Data Source=MedExpress.db;Version=3;Password=\"test\";");
また
_connection = new SQLiteConnection("Data Source=MedExpress.db;Version=3;Password=test;");
しかし、これはうまくいきません。
エラーは次のとおりです。 File opened that is not a database file
file is encrypted or is not a database
次のように、パスワードなしでデータベースに接続できます。
_connection = new SQLiteConnection("Data Source=MedExpress.db;Version=3;");
私の質問は、sqlite データベースにパスワードを設定し、C# プログラムから接続する方法です。System.Data.SQLite