SQLite and Encryption
Posted: 21.11.2008, 21:59
I found the [link="http://zeos.firmos.at/kb.php?mode=article&k=14"]knowledgebase[/link] article for using encryption in ZEOS 6.6.4, but still can't seem to get it to work. I create a new project, save it to disk, make sure the .NET Sqlite DLL is in the same directory, set the Zconnection protocol to sqlite-3 and the database property pointing to the database, and have the following code attached to a button:
but when I run it says "SQL Error: file is encrypted or is not a database"
Does anybody have an idea what I am doing wrong? The knowledgebase article mentions about setting the Parameter to 'encrypted=true' however I can find no Parameter property, the nearest thing is Properties. I also notice in the knowledgebase article it mentions about manually running the .Key method, but how do I get to it?
Many thanks in advance. Colin.
Code: Select all
zconnection1.Properties.Clear;
ZConnection1.password:='letmein';
ZConnection1.Properties.Add('encrypted=true');
ZConnection1.Connect;
ZTable1.TableName:='Lawyers';
ZTable1.Active:=true;
Does anybody have an idea what I am doing wrong? The knowledgebase article mentions about setting the Parameter to 'encrypted=true' however I can find no Parameter property, the nearest thing is Properties. I also notice in the knowledgebase article it mentions about manually running the .Key method, but how do I get to it?
Many thanks in advance. Colin.