#1 Re: mORMot 1 » Encrypt database » 2011-11-11 19:22:53

It is already the case.

Thanks, tested - OK.

If the current version works, there is no need to use the wxsqlite implementation, which is more complex to integrate.

The advantage I see is that the resultant database will be compatible with other implementations, and that it camouflages the fact that the file is a sqlite database.

If I decrypt an encrypted database, the file seems to be not fully sqlite compatible. sqlite browser cannot open the file. sqlite console will read the file, but will keep the PC bell ringing.

#2 Re: mORMot 1 » Encrypt database » 2011-11-11 06:04:19

Are you implementing the new encryption on to TSQLDBSQLite3ConnectionProperties.Create?

Any plans to link with Wxsqlite?

#4 Re: mORMot 1 » Why a new Framework? » 2011-10-24 17:40:00

I can't find where the authentication is defined. All I can find is
Server := TSQLite3HttpServer.Create('8080',[DB], 'localhost');

#5 Re: mORMot 1 » Why a new Framework? » 2011-10-23 19:02:01

When I try to connect to the http server on localhost through fire fox (http://localhost:8080/root/SampleRecord/1), I get a blank screen.
When I try through IE, I get the error: You are not authorized to view this page

#6 Re: mORMot 1 » Encrypt database » 2011-10-18 06:02:30

You should use ChangeSQLEncryptTablePassWord before you connect with the database

ChangeSQLEncryptTablePassWord(DBFilename, '', edtPassword.Text);

#7 Re: mORMot 1 » Encrypt database » 2011-10-17 19:49:36

Near the end of the test, the encryption is removed.
Try adding this line to the end of TTestExternalDatabase.CryptedDatabase; :
ChangeSQLEncryptTablePassWord('testpass.db3', '', password);

#8 Re: mORMot 1 » Encrypt database » 2011-10-17 19:33:00

I was wrong.
even though sqlite browser does not list data, sqlite console shows the table and data - except that PC's bell is ringing throughout the listing.

#9 Re: mORMot 1 » Encrypt database » 2011-10-17 18:13:08

Is it available to TSQLDBSQLite3ConnectionProperties.Create?

#10 Re: mORMot 1 » Encrypt database » 2011-10-17 17:52:08

It works for me.
This time even though testpass.db3 opens in sqlite3 browser, even the database structure is not visible.
Array, have you removed the old synopse directories from delphi library options?

#12 Re: mORMot 1 » Encrypt database » 2011-10-13 18:53:29

It is not a wrapper over hwaci SEE but over standard SQlite with added encryption. My understanding is it is a standalone implementation of encryption. However it is compatible with Hwaci implement.
I have used the dll with ZeosDB successfully.

http://zeos.firmos.at/kb.php?mode=article&k=14

#13 Re: mORMot 1 » Encrypt database » 2011-10-13 15:53:41

ab,
Is it possible to statically link with WxSqlite and use the encryption implemented be Wxsqlite? - just an idea.

#14 Re: mORMot 1 » Encrypt database » 2011-10-08 17:04:21

If you are in a hurry, ZeosDBO is a good solution.
It provides sqlite3 encryption when used sqlite3.dll from WxSqlite or System.Data.SQLite. My experience is that WxSqlite is superior to the later.
See http://zeos.firmos.at/viewtopic.php?t=1 … ecb3efde22
Development is more or less stalled at the moment, however, the library is very stable (IMHO).
The only drawback I experienced is that static linking of sqlite is not available.

#15 Re: mORMot 1 » Woes with attach database » 2011-10-08 11:02:20

Sorry for the delay in replying as I was away fort a week.
Now I found the problem with my program logic which prevented the attach statement from executing in certain situations. Now it is working OK.
I am still puzzled with :memory:. Let me test it a few more times before reporting.

Sorry for the inconvenience.

#16 mORMot 1 » Woes with attach database » 2011-10-02 14:01:45

Phisatho
Replies: 2

My woes with attach database continues. I am not able to attach a non-existent database.
Same case as :memory: as mentioned in the encryption thread. I believe both issues are related as a memory database does not exist when attached.
As this not related to encryption, I thought I will rather start a new thread.
I tried both codes below:

DBsUser.ExecuteNoResult('ATTACH DATABASE ? AS Savefile;', [UserFileName]);

and

     QRsUser.Prepare('ATTACH DATABASE ? AS Savefile;');
         QRsUser.BindTextS(1, UserFileName);
         QRsUser.ExecutePrepared;

both results in the error:
'SQL logic error or missing database.'

#17 Re: mORMot 1 » Encrypt database » 2011-10-01 14:09:30

I circumvented the issue bu making :memory: as the main database which involved extensive changes to the code. I will do further tests later and let you know.
Single quotes within single quotes is not allowed in Delphi.

#18 Re: mORMot 1 » Encrypt database » 2011-09-30 19:37:27

Hi ab,
Thanks for the help.
However, I am facing a new problem now. I am not able to attach a :memory: database.
The code:

DBsUser.ExecuteNoResult('ATTACH DATABASE ":memory:" AS Memfile;', [VarRec]);

I am getting the error:
"SQL logic error or missing database"

#19 Re: mORMot 1 » Encrypt database » 2011-09-28 15:48:39

I tried CreateSQLEncryptTable.
The data is encrypted. However, the table structure is still visible from sqlite browser. Is that the way it is supposed to be or am I missing something?

procedure TForm1.Button1Click(Sender: TObject);
var
   VarRec: array of TVarRec;
begin
   CreateSQLEncryptTable('123');
 //  ChangeSQLEncryptTablePassWord('test.db3','123',''); 
   SQLite3DB := TSQLDBSQLite3ConnectionProperties.Create('Test.db3', '', '', '');
   SQLite3DB.ExecuteNoResult('create table if not exists mytable (a integer, b integer);', VarRec);
   SQLite3DB.ExecuteNoResult('INSERT INTO mytable VALUES (1, 2);', VarRec);
   SQLite3DB.ExecuteNoResult('INSERT INTO mytable VALUES (3, 4);', VarRec);
   SQLite3DB.ExecuteNoResult('INSERT INTO mytable VALUES (5, 62);', VarRec);
   SQLite3DB.ExecuteNoResult('INSERT INTO mytable VALUES (7, 8);', VarRec);
   
end;

I dont understand what that TVarRec array is doing in a no-result-query
I am wondering why TSQLDBSQLite3ConnectionPropertiesis named so and not TSQLDBSQLite3Connection.

#20 Re: mORMot 1 » Encrypt database » 2011-09-27 15:54:43

Thanks ab for the help. I was able to create a simple example using SynDBSQLite3.

However, the problem array81 reported is confirmed. My code below:

procedure TForm1.Button1Click(Sender: TObject);
var
   VarRec: array of TVarRec;
begin
   SQLite3DB := TSQLDBSQLite3ConnectionProperties.Create('Test.db3', '', '', '123');
   SQLite3DB.ExecuteNoResult('create table if not exists mytable (a integer, b integer);', VarRec);
   SQLite3DB.ExecuteNoResult('INSERT INTO mytable VALUES (1, 2);', VarRec);
end;

The database is successfully created, but I can open the file in a sqlite browser without any password.
ab, can you please look into it?

#21 Re: mORMot 1 » Encrypt database » 2011-09-24 19:30:47

Synopse with static linking and encryption fits my bill perfectly.
However, ORM is beyond me. Can you please provide a simple CRUD example with SQL?

Array81, I suspect that the fifth parameter (aHandleUserAuthentication) need to be true. ab, any comments?

Board footer

Powered by FluxBB