Page 1 of 1

Sqlite3 databases and the program to manipulate them with the possibility to export them with their content as RTF

Posted: Thu Aug 29, 2019 7:52 pm
by orion87
Hi, I'll say I'm an amateur in programming. Reading the site and the forum I realized that there is the method "TDBRichViewEdit" to manipulate databases with RVF content. I have sqlite3 databases with RVF content as a BLOB format. Is there someone who can upload a demo of some sqlite3 database editor already compiled, so that it can modify the content and eventually export the database with RTF content? I also say that I tried to compile the database editor included in TRichView myself, but I didn't really understand something. I just found some small program which has inside its folder a database called "SampleTable.db", without even the possibility of export. I would like something more complex. Also, I tried to insert some sqlite3 database into the folder, named it in "SampleTable.db" and tried to start the database editor, but it gives an error that says "corrupted header file etc." or something like that.
I also wanted to know if the editor works with compressed databases, and I know that the compression format of some databases I have (not those I tried to open with your editor) is a simple Gzip. Thanks in advance.

Re: Sqlite3 databases and the program to manipulate them with the possibility to export them as RTF

Posted: Fri Aug 30, 2019 7:00 am
by Sergey Tkachenko
Sorry, I do not understand. If you have a database with RVF documents, but without an editor for this database, how could you create this database?

Re: Sqlite3 databases and the program to manipulate them with the possibility to export them as RTF

Posted: Fri Aug 30, 2019 9:29 am
by orion87
Sergey Tkachenko wrote: Fri Aug 30, 2019 7:00 am Sorry, I do not understand. If you have a database with RVF documents, but without an editor for this database, how could you create this database?
These databases are created with the Bible software named theWord: https://www.theword.net/
This software uses the source code of TRichView and is able to create modules (sqlite3) with the content in RVF and RTF format, saved as BLOB format. The problem is that I need to convert RVF into RTF, and this program (theWord) doesn't allow me to do that.

Re: Sqlite3 databases and the program to manipulate them with the possibility to export them as with their content as RT

Posted: Sat Aug 31, 2019 7:52 am
by Sergey Tkachenko
The program that converts fields to RTF is very simple.

Let Table is a dataset that opens a table containing this field.
Let DBRVE: TDBRichViewEdit is linked to the field.

This code converts this field to RTF:

Code: Select all

DBRVE.AutoDeleteUnusedStyles := True;
DBRVE.FieldFormat := rvdbRTF;
Table.First;
while not Table.EOF do
begin
  Table.Edit;
  DBRVE.Change;
  Table.Post;
  Table.Next;
end;

Re: Sqlite3 databases and the program to manipulate them with the possibility to export them as with their content as RT

Posted: Sat Aug 31, 2019 9:05 am
by orion87
Ok, but since I am a beginner in programming, I wanted a compiled DEMO which does this without inserting codes. I wanted a program with a GUI which opens sqlite3 databases and with one click converts them into RTF. More or less like database manager such as DB Browser: https://sqlitebrowser.org/. This because I do not even know where to put the code you have inserted.

Re: Sqlite3 databases and the program to manipulate them with the possibility to export them with their content as RTF

Posted: Sat Aug 31, 2019 10:14 am
by orion87
I discovered another problem: the text is encrypted. So there is nothing to do without decrypting it. Thanks anyway for your information.