SQLCipher for ADO. NET "file is encrypted or is not a database"

i’m using trial version of SQLCipher for ADO.Net. My code:

var DB:SQLiteConnection := new SQLiteConnection (‘Data Source=’+DBName+’; Password=mypass’);

var cmd:SQLiteCommand := DB.CreateCommand ;
cmd.CommandText := ‘SELECT * FROM store;’;
var reader := cmd.ExecuteReader();
//in this line error message “file is encrypted or is not a database”

But SQLiteManager open this base successfully.

Hello @diagtruck

Would you try setting up your DB instance like this:

var DB:SQLiteConnection := new SQLiteConnection ('Data Source='+DBName+';Password=mypass;SetDefaults=false;');

No result. Same error.

Database dump.

Unfortunately the database dump won’t be very helpful in diagnosing this. Are you creating the database using SQLiteManager? Can you try to create a new database using SQLCipher in ADO.NET, i.e. without SQLiteManager?

No. Database not creating using SQLiteManager. But SQliteManager open this base.