[Demo] DB Editor

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 14654
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demo] DB Editor

Post by Sergey Tkachenko » Tue Oct 09, 2007 4:59 pm

http://www.trichview.com/support/files/dbeditdemo.zip

This is an analog of the demo Demos\Delphi\Editors\Editor 2\, but with TDBRichViewEdit instead of TRichViewEdit.
This demo implements basic commands for changing text and paragraph attributes (without RichViewActions)

This ZIP file includes several versions of this demo:
  • BDE (Paradox table)
  • FireDAC (InterBase table)
  • ADO / dbGo (Microsoft Access 2010 table)
[+] Updates
2019-Jul-08: ADO with MS Access demo is added.
2018-Apr-16: in addition to BDE demo, I added FireDAC demo with InterBase table. The demo was created in Delphi 10.2, the table was created using InterBase 2017, but I hope they work in older versions of Delphi and InterBase too.

Nostradamus
Posts: 42
Joined: Sat May 13, 2006 1:56 pm
Location: Australia

Project does not compile in Delphi 2010

Post by Nostradamus » Sat Dec 28, 2013 6:32 pm

Hi,

I could not get this DB project to compile on Delphi 2010.

Any help is appreciated

I have windows 7 - 64 bit

thanks and
Happy New Year

Richard[/img]

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

Post by Sergey Tkachenko » Sun Dec 29, 2013 9:18 am

This demo uses BDE and Paradox table.
Probably, you did not install BDE support when installing Delphi.
Also, Win7 may have problems working with BDE (this demo works fine on Win8, though)

You can try using another DB engine - replace Table1: TTable to you favorite DB dataset components.
A table must have Document field able to store arbitrary binary data.

Nostradamus
Posts: 42
Joined: Sat May 13, 2006 1:56 pm
Location: Australia

project is working now...

Post by Nostradamus » Wed Apr 02, 2014 11:34 pm

I tried the project again today and it works now.

Thanks

Serge

PS I am still using Windows 7

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

Re: [Demo] DB Editor

Post by Sergey Tkachenko » Mon Apr 16, 2018 10:08 am

FireDAC version of this demo is added (in the same ZIP file)

Nostradamus
Posts: 42
Joined: Sat May 13, 2006 1:56 pm
Location: Australia

Re: [Demo] DB Editor

Post by Nostradamus » Sun Jul 07, 2019 6:44 am

HI SERGEY,

I TRIED THE FIREDAC VERSION IT DOES NOT WORK WITH DELPHI 2010.

I USUALLY TEND TO USE ADO COMPONENTS WITH MS ACCESS AS THIS IS THE ONLY DATABASE .mdb THAT WORKS WITH OLE JET 4 DB PROVIDER
WHEN

BUILDING DATABASE CONNECTION.

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

Re: [Demo] DB Editor

Post by Sergey Tkachenko » Sun Jul 07, 2019 6:24 pm

I'll try to make an example in the next couple of days.

The main problem with MS Access, as far as I understand, the lack of field type for storing arbitrary binary data (required for RVF).
Unfortunately, even "text mode" RVF is not really a plain text and requires a binary field.

Well, there is a solution: use a memo field and encode RVF in a text string (using a hexadecimal code or base64). I'll implement it in the demo.

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

Re: [Demo] DB Editor

Post by Sergey Tkachenko » Mon Jul 08, 2019 7:58 pm

I added ADO+Access version of this demo.

As I said above, the main difficulty was storing binary RVF data in a text (memo) field.

I used the simplest possible binary-to-text encoding - hexadecimal code. It is simple and fast, but increases data size by 100%.

A better alternative would be Base64 encoding, it increases data size only by 33%.
Unfortunately, base64 functions were included in Delphi only since XE7, and you need Delphi 2010 version. You can use DIMime for base64 encoding.

Post Reply