in

System.Data.SQLite

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

sqlite3.exe (compatibility) Error: file is encrypted or is not a database

Last post 02-25-2010 12:02 AM by jorabo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-24-2010 7:39 AM

    • jorabo
    • Not Ranked
    • Joined on 02-24-2010
    • Posts 2

    sqlite3.exe (compatibility) Error: file is encrypted or is not a database

    Hi,

    I created a new database on my PDA with CF3.5 and everythin works fine as long as i use the databasefile with  .net on my PDA.

    but when i copy the databasefile to my windows pc and try to oben the databasefile with the current version of sqlite3.exe .... I get the following message:

    Error: file is encrypted or is not a database

    I don encrypt the database, so I can eleminate one of this points.

    What can I do to use the same databasefiles on other hosts ?

    Regards,

    Jonny

    ShowMsg("...creating new database")

    SQLite.SQLiteConnection.CreateFile(dbfilename)

    con =
    New SQLite.SQLiteConnection("Data Source=" & dbfilename)ShowMsg("SQLite-Version=" & SQLite.SQLiteConnection.SQLiteVersion)

    con.Open()

     ...

     

     

     

     

  • 02-24-2010 7:55 AM In reply to

    Re: sqlite3.exe (compatibility) Error: file is encrypted or is not a database

    Did you use a password on your PDA's connection string?

    What version of the sqlite3.exe are you using?

  • 02-25-2010 12:02 AM In reply to

    • jorabo
    • Not Ranked
    • Joined on 02-24-2010
    • Posts 2

    Re: sqlite3.exe (compatibility) Error: file is encrypted or is not a database

    Found  the solution.

    Everything works fine if you do this (now you can open the database with the normal winows executable):

    SQLite.SQLiteConnection.CreateFile("sqlite.db")

    con = New SQLite.SQLiteConnection("Data Source=sqlite.db")

    con.Open()

    Dim mycommand As New SQLiteCommand(con)

    mycommand.CommandText = "create table tbl1(one varchar(10), two smallint);"

    mycommand.ExecuteNonQuery()

    mycommand.CommandText = "insert into tbl1 values('hello!',10);"

    mycommand.ExecuteNonQuery()

    mycommand.CommandText = "insert into tbl1 values('goodbye', 20);"

    mycommand.ExecuteNonQuery()

    con.Close()

    BUT if you do this (even without changing the database encryption like described) opening with PDA works, but with windows it is not possible.

    SQLite.SQLiteConnection.CreateFile("sqlite.db")con = New SQLite.SQLiteConnection("Data Source=sqlite.db;Password=)

    con.Open()

    Dim mycommand As New SQLiteCommand(con)

    mycommand.CommandText = "create table tbl1(one varchar(10), two smallint);"

    mycommand.ExecuteNonQuery()

    mycommand.CommandText = "insert into tbl1 values('hello!',10);"

    mycommand.ExecuteNonQuery()

    mycommand.CommandText = "insert into tbl1 values('goodbye', 20);"

    mycommand.ExecuteNonQuery()

    con.Close()

     

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems