Page 1 of 1
Using tdbRichViewEdit with Sqlite DB version 3
Posted: Sat Sep 17, 2011 5:39 pm
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?
Posted: Sat Sep 17, 2011 7:25 pm
by Sergey Tkachenko
Can you save a content of such field to a file (using BlobField.SaveToStream(FileStream)) and send this file to me?
Using tdbRichViewEdit with Sqlite DB version 3
Posted: Mon Sep 19, 2011 9:49 am
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
Using tdbRichViewEdit with Sqlite DB version 3
Posted: Mon Sep 19, 2011 10:00 am
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
Posted: Mon Sep 19, 2011 2:25 pm
by Sergey Tkachenko
Right click DBRichViewEdit in Delphi, choose "Settings" in the context menu, set "Allow adding styles dynamically".
Using tdbRichViewEdit with Sqlite DB version 3
Posted: Mon Sep 19, 2011 5:45 pm
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
Posted: Mon Sep 19, 2011 5:55 pm
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.