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

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
mixkiel
Posts: 2
Joined: March 19th, 2022, 10:55 pm

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

Post 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.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

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

Post 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!
Last edited by htuser on March 21st, 2022, 7:38 am, edited 2 times in total.
G.VOLNY, a CSProuser from Haiti, since 2004
lmangcahan
Posts: 25
Joined: September 7th, 2021, 3:45 am

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

Post by lmangcahan »

Hi htuser,

Have you tried the SQLCiper? Do you happen to have a code snippet of SQLCiper connecting to SQLite of CSDb?
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

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

Post 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,
G.VOLNY, a CSProuser from Haiti, since 2004
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

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

Post 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.
Post Reply