Search found 55 matches

by kjteng
11.09.2022, 01:35
Forum: ZeosLib 7.3/8.0 Forum
Topic: Problem with malformed json using sqlite
Replies: 2
Views: 401

Re: Problem with malformed json using sqlite

Thanks for your reply.
by kjteng
10.09.2022, 10:43
Forum: ZeosLib 7.3/8.0 Forum
Topic: Problem with malformed json using sqlite
Replies: 2
Views: 401

Problem with malformed json using sqlite

I have a sqlite table with ID and DATA (Text, to store json data) fields as follows: ID DATA 1 [1,2,3] 2 ["1","2","3"] 3 [1,2,3, [4,5,6]] 4 [1,2,3,{"AA":4, "BB":5, "CC":6}] 5 [1,2,3 6 [1] 7 {"AA":1} When I query (using TZQuery) th...
by kjteng
21.08.2022, 05:16
Forum: Lazarus / Freepascal
Topic: Encrypt/decrypt database with wsSQlite /Lazarus
Replies: 19
Views: 1514

Re: Encrypt/decrypt database with wsSQlite /Lazarus

I have updated and tested my amendment for the latest version of zeoslib (Merged revision(s) 7863 from branches/8.0-patches).
The modified file (ZDbcSqLite.pas) is available at :- https://github.com/kjteng/zeoslib/tree/main/ZDbcSqLite
The older version has been renamed to ZDbcSqLite2.pas
by kjteng
15.12.2021, 01:33
Forum: Lazarus / Freepascal
Topic: Encrypt/decrypt database with wsSQlite /Lazarus
Replies: 19
Views: 1514

Re: Encrypt/decrypt database with wsSQlite /Lazarus

Hi aehimself: Thanks for the pointer on the github procedures. The pragma codes will not works if it is put in before connect or after connect. By trial and error, I found that wxSqlite decryption works only if the pragma statements are called after 'FPlainDriver.sqlite3_open(....)' but before the '...
by kjteng
14.12.2021, 10:39
Forum: ZeosLib 7.3/8.0 Forum
Topic: dbmemo/dbgrid problem
Replies: 5
Views: 558

Re: dbmemo/dbgrid problem

Hmmm - could you please check what happens if you disable the ZFields? I am not sure wether that has to happen in the Zeos.inc or in the properties of the dataset though... You mean set the DisableZFields ? I tried ...same outcome whether disableZFields is True or False. The change in memofield wou...
by kjteng
14.12.2021, 02:44
Forum: Lazarus / Freepascal
Topic: Encrypt/decrypt database with wsSQlite /Lazarus
Replies: 19
Views: 1514

Re: Encrypt/decrypt database with wsSQlite /Lazarus

Nice :) Unfortunately I don't have a license for SEE. So all we can do for now is to hope that we get everything right. Some questions though: - Is this change part of your file on github? - Any chance for you to clone Zeos on Github and make the changes there? ;) Best regards, Jan - Yes. I have up...
by kjteng
12.12.2021, 09:39
Forum: ZeosLib 7.3/8.0 Forum
Topic: dbmemo/dbgrid problem
Replies: 5
Views: 558

Re: dbmemo/dbgrid problem

Ya, if I have add a line 'fields[x].asString := fields[x].asString (x is another field) then the memofield will be updated.
Is there a bug somewhere?
by kjteng
12.12.2021, 06:30
Forum: Lazarus / Freepascal
Topic: Encrypt/decrypt database with wsSQlite /Lazarus
Replies: 19
Views: 1514

Re: Encrypt/decrypt database with wsSQlite /Lazarus

OK. I have made further changes to cater for SEE Sqlite. User for SEE Squlite should leave the Info.value['Cipher'] empty and include the cipher type as part of the key e.g. aes256:mykey, rc4:mykey etc to comply with SEE format. My problem now: SEE extension of Sqlite is not public dormain (i.e. nee...
by kjteng
22.11.2021, 05:16
Forum: ZeosLib 7.3/8.0 Forum
Topic: dbmemo/dbgrid problem
Replies: 5
Views: 558

dbmemo/dbgrid problem

I noticed that changes in dbmemo are not saved when I moved to another record (in dbgrid). This happens if I am using Tzquery/TzMemtable (but not when I am using TMemDataset or Tdbf component).
Attached is the demo file.
by kjteng
21.11.2021, 08:25
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemtableExt - helper class for zMemTable
Replies: 2
Views: 197

Re: zMemtableExt - helper class for zMemTable

Hi aehimself:
Thank you so much for your valuable feedback.
I have made the necessary changes based on your advice. I used array of integer instead of TArray<Integer> because I am not familiar with the use of generic type (and will study further on this subject).
Regards,
kjteng
by kjteng
20.11.2021, 16:56
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemTable - remove fields and unwanted records
Replies: 12
Views: 651

Re: zMemTable - remove fields and unwanted records

miab3 wrote: 18.11.2021, 07:02 Hi kjteng,

I was hoping that since you use this, you would write some useful procedures and share with us.

Michał
Hi Michal,
I have uploaded to github. see viewtopic.php?f=50&t=148850.
by kjteng
20.11.2021, 16:53
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemtableExt - helper class for zMemTable
Replies: 2
Views: 197

zMemtableExt - helper class for zMemTable

This is a helper class for zMemTable developed for my personal project. I have and made it (with demo program) available at https://github.com/kjteng/zMemTableExt Methods implemented (using zstream.pas to compress the data) procedure SaveToBlob(BField: TBlobField); procedure LoadFromBlob(BField: TBl...
by kjteng
18.11.2021, 00:05
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemTable - remove fields and unwanted records
Replies: 12
Views: 651

Re: zMemTable - remove fields and unwanted records

miab3 wrote: 17.11.2021, 12:44
kjteng wrote: 17.11.2021, 11:56 Where can I find ZMemTableUtils.pas ?
I thought you would write.

Michał
Haha. Okok. I will include it in my helper file.
by kjteng
17.11.2021, 11:56
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemTable - remove fields and unwanted records
Replies: 12
Views: 651

Re: zMemTable - remove fields and unwanted records

miab3 wrote: 17.11.2021, 10:04 Hi kjteng,
...
As well as adding new fields.
And copy the data in a traditional way, indicating the correct ones.
In fact, a library of such routines, the ZMemTableUtils, would come in handy.

Michał
OK I see your point. Thank you for the valuable advice.
Where can I find ZMemTableUtils.pas ?
by kjteng
17.11.2021, 04:21
Forum: ZeosLib 7.3/8.0 Forum
Topic: zMemTable - remove fields and unwanted records
Replies: 12
Views: 651

Re: zMemTable - remove fields and unwanted records

Hi kjteng, all, You can operate between many different ZMemTable. It would be more interesting and relatively simple to write/read parts (from-to) of the ZMemTable to/from disk, and merge data. Though it might actually be useful to copy the definitions of the specified fields and data to the ZMemTa...