Page 1 of 1

[Demo] DB Editor

Posted: Tue Oct 09, 2007 4:59 pm
by Sergey Tkachenko
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.

Project does not compile in Delphi 2010

Posted: Sat Dec 28, 2013 6:32 pm
by Nostradamus
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]

Posted: Sun Dec 29, 2013 9:18 am
by Sergey Tkachenko
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.

project is working now...

Posted: Wed Apr 02, 2014 11:34 pm
by Nostradamus
I tried the project again today and it works now.

Thanks

Serge

PS I am still using Windows 7

Re: [Demo] DB Editor

Posted: Mon Apr 16, 2018 10:08 am
by Sergey Tkachenko
FireDAC version of this demo is added (in the same ZIP file)

Re: [Demo] DB Editor

Posted: Sun Jul 07, 2019 6:44 am
by Nostradamus
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.

Re: [Demo] DB Editor

Posted: Sun Jul 07, 2019 6:24 pm
by Sergey Tkachenko
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.

Re: [Demo] DB Editor

Posted: Mon Jul 08, 2019 7:58 pm
by Sergey Tkachenko
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.

Re: [Demo] DB Editor

Posted: Tue Dec 07, 2021 7:45 am
by Nostradamus
Hi Sergey,
I am trying to get back into things while I still have some free time...
in this project you mention a datafile... 'DemoData.ib'
Can I have a copy of this file ?

Thanks
Richard


procedure TForm1.FormCreate(Sender: TObject);
begin
// Filling font names combobox
cmbFont.Items.Assign(Screen.Fonts);
// Opening table
with FDConnection1.Params do
begin
Clear;
Add('DriverID=IB');
Add('Database=localhost:' + ExtractFilePath(Application.ExeName) + 'DemoData.ib');
Add('User_Name=SYSDBA');
Add('Password=masterkey');
end;
FDConnection1.Connected := True;
FDTable1.Open('');
end;

Re: [Demo] DB Editor

Posted: Tue Dec 07, 2021 9:32 am
by Sergey Tkachenko
DemoData.ib is included

Re: [Demo] DB Editor

Posted: Wed Dec 08, 2021 10:17 am
by Nostradamus
OK My error... I forgot to install RAD SERVER

still get error message though...

DBEditl: Field Title' not found.

see attached error message also.
cheers
Richard

Re: [Demo] DB Editor

Posted: Fri Dec 24, 2021 6:24 pm
by Nostradamus
I finally got the FireDC_IB project working today

Merry Xmas