Page 1 of 1

Could not connect on sqlite csdbe (file is not a database)

Posted: March 19th, 2022, 11:08 pm
by mixkiel
Im trying to connect to csdbe sqlite database. but i dont know what connection string i need to connect.

my application written in java and sample.csdbe password is like 11111.
DriverManager.getConnection("jdbc:sqlite:sample.csdbe?key=");

Thankyou.

Re: Could not connect on sqlite csdbe (file is not a database)

Posted: March 20th, 2022, 4:58 pm
by htuser
I don't think you'll be able to connect to the CSDBe with password outside CSPro apps and tools, such as dataview etc.
It's because,the SQLite Encryption Extension (SEE) used to encrypt the CSDB is not free . This require you to buy a licence of this for any attempt to open an encrypted sqlite database (CSDBe for CSPro) outside the software environment that the licence has been acquired for .

I don't understand why the developer team doesn't use an open source encrypt lib such as SQLCipher community license...

Note that, almost all encrypting libs for SQLite (CSDb) are not free. For SQLCiper, the community version is 3-4 times slower than the paying version.

Hope this help you!

Re: Could not connect on sqlite csdbe (file is not a database)

Posted: March 20th, 2022, 9:00 pm
by lmangcahan
Hi htuser,

Have you tried the SQLCiper? Do you happen to have a code snippet of SQLCiper connecting to SQLite of CSDb?

Re: Could not connect on sqlite csdbe (file is not a database)

Posted: March 21st, 2022, 6:22 am
by htuser
Have you tried the SQLCiper? Do you happen to have a code snippet of SQLCiper connecting to SQLite of CSDb?
In my previous post, i mentioned that CSDBE use SQLite Encryption Extension (SEE), not SQLCiper.
So, SQLCiper will not work.
Best,

Re: Could not connect on sqlite csdbe (file is not a database)

Posted: March 21st, 2022, 7:55 am
by Gregory Martin
htuser is correct. You will not be able to use SQLCipher to open a .csdbe file. We decided to use the SQLite Encryption Extension for a variety of reasons. If you had a license of that, we could explain how to generate a key from a password to open the file.

This may not be possible given your security constraints, but the easiest option would be to temporarily create a .csdb file from the .csdbe file, query it, and then delete that .csdb file upon exiting your program. The quickest way to create a .csdb from a .csdbe file would be to use the Concatenate Data tool, having the .csdbe file as your input to concatenate to your output .csdb file.