Using tdbRichViewEdit with Sqlite DB version 3

General TRichView support forum. Please post your questions here
Post Reply
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Using tdbRichViewEdit with Sqlite DB version 3

Post by jota »

Hello

I´m using a tdbrichviewedit with a blob field in a table in a sqlite db.

I edit and save this field without problem but when I read other time the content display a numeric sequence and control chars.

I´m saving in binary mode. Perhaps is a problem with sqlite db blob field? Can I make some conversion data type? How I can solve this problem?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you save a content of such field to a file (using BlobField.SaveToStream(FileStream)) and send this file to me?
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Using tdbRichViewEdit with Sqlite DB version 3

Post by jota »

Hi

I can not generate filestream.

I´m using ASqlite3Components for db sqlite access and i think program is not recognize field like blob type.

Original value in tdbrichviewedit is "Hello world"

Insert statement in sqlite (second element is a blob field: INSERT INTO "Notes" VALUES(2,X'2D382031203320310D0A2D372030202D312030203020302030203533363837303931310D0A30203120302038203020300D0A480065006C006C006F00200057006F0072006C00640029200000000000000100000084AF4500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',NULL);

I expect this information clarify the situation

Thanks
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Using tdbRichViewEdit with Sqlite DB version 3

Post by jota »

Sorry, tdbrichviewedit display next information after read

-8 1 3 1
-7 0 -1 0 0 0 0 536870911
0 1 0 8 0 0
H e l l o W o r l d ) „¯E

Thank
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Right click DBRichViewEdit in Delphi, choose "Settings" in the context menu, set "Allow adding styles dynamically".
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Using tdbRichViewEdit with Sqlite DB version 3

Post by jota »

Hello

The problem persist with "Allow adding styles dynamically".

To ensure the problem isn´t installation, i reinstall trichviewedit. After that appear a message in text edition place: "Unsupported field type: BLOB is required".

Definition of blob field in sqlite table is next:

CREATE TABLE "Notes"(
[ClaNot] integer PRIMARY KEY UNIQUE NOT NULL REFERENCES [TreeElement] ([ClaEle]) On Delete NO ACTION On Update NO ACTION
,[DesNot] blob NOT NULL
,[FecAte] datetime
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, I am not familiar with this database.
However, this error message appears if DBRichViewEdit is linked to a field of a type what is not TBlobField (or inherited).
DBRichViewEdit cannot work with not-BLOB fields, because it uses field.SaveToStream and LoadToStream.
Post Reply