Newbie wxSqlite3 question  [SOLVED]

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
hsalas
In need of some credit
In need of some credit
Posts: 8
Joined: Mon Mar 29, 2010 11:44 pm

Newbie wxSqlite3 question

Postby hsalas » Mon Mar 29, 2010 11:56 pm

Hi, friends.

I've downloaded wxSqlite3 and compiled with VC++ 2008 EE successfully (DLL Unicode Release Mulitlib DLL Win 32).

However I need encryption features on it. I read the 'readme' file, but I'm confused with the instructions.

¿How can I compile wxSqlite3 with encryption capabilities, from VC++ 2008 EE, without compiling sqlite again?

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Newbie wxSqlite3 question

Postby utelle » Tue Mar 30, 2010 7:52 am

hsalas wrote:However I need encryption features on it. I read the 'readme' file, but I'm confused with the instructions.

¿How can I compile wxSqlite3 with encryption capabilities, from VC++ 2008 EE, without compiling sqlite again?

If you want to use the precompiled SQLite DLL with encryption coming with wxSQLite3 you need to either copy the files in sqlite3/secure to sqlite3/lib or have to direct the compiler/linker to the right library path by changing the additional libaries path in the project settings.

Additionally you have to enable access to the encryption feature by setting the preprocessor symbol

WXSQLITE3_HAVE_CODEC=1

You can do this in the project settings or you can change header file wxsqlite3opt.h to your needs.

Regards,

Ulrich

hsalas
In need of some credit
In need of some credit
Posts: 8
Joined: Mon Mar 29, 2010 11:44 pm

Postby hsalas » Tue Mar 30, 2010 6:41 pm

Thank you very much Ulrich. I figured out that way.

On the other hand, I had to set wxUSE_DYNAMIC_SQLITE3_LOAD to 1 for a success complilation. The "readme" file does not mention, at least not what I saw.

One more question: ¿wxSqulite3 encrypting database process is on the fly?

utelle
Moderator
Moderator
Posts: 823
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Postby utelle » Tue Mar 30, 2010 8:45 pm

hsalas wrote:On the other hand, I had to set wxUSE_DYNAMIC_SQLITE3_LOAD to 1 for a success complilation. The "readme" file does not mention, at least not what I saw.

If wxUSE_DYNAMIC_SQLITE3_LOAD is set to 1 the SQLite link library sqlite3.lib is not needed. Usually it should not be a problem to leave wxUSE_DYNAMIC_SQLITE3_LOAD set to 0 if the path for additional link libraries is correctly set.

hsalas wrote:One more question: ¿wxSqulite3 encrypting database process is on the fly?

The encryption extension coming with wxSQLite3 is built into the SQLite library itself and is independent of the wxSQLite3 wrapper and wxWidgets. If encryption is activated by specifying a password phrase (i.e. either from wxSQLite3 in the Open method of wxSQLite3Database or via a PRAGMA KEY command in the command line tool) encryption takes place transparently. When SQLite loads a database page into memory it is decrypted and when it saves a page to file it is encrypted.

Regards,

Ulrich

hsalas
In need of some credit
In need of some credit
Posts: 8
Joined: Mon Mar 29, 2010 11:44 pm

  [SOLVED]

Postby hsalas » Tue Mar 30, 2010 10:58 pm

Thank you very much. All is clear now.

Best regards :D


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest