in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Setting Password to existing database

Last post 09-16-2009 9:34 PM by Prachi. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-16-2009 9:34 PM

    • Prachi
    • Top 150 Contributor
    • Joined on 09-10-2009
    • Posts 9

    Setting Password to existing database

    Hello, I am new to SQLite. I have created my database in SQLite using SQLite Administrator tool. I want to encrypt/decrypt my database. I have wriiten following code to set Password for database :- ConnectionString="Data Source=d:\DoctorPlus.s3db;" If _Connection Is Nothing Then _Connection = New SQLiteConnection(ConnectionString) End If _Connection.SetPassword("myfair") _Connection.Open() _Connection.ChangePassword("myfair") But it gives following error :- File opened that is not a database file file is encrypted or is not a database Please tell me steps to set password to existing database and open it. How can I open the database in SQLite Administrator tool when Passsword is set to the database.When I set password to the database created from SQLite Admin Tool (.s3db) and open it ,it gives error "Cannot preform operation on closed dataset" Also, what query should be written in SQLite editor to open the database to which password is set.
    Filed under:
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems