TStringField and DBRichEdit Problem

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rmy
Posts: 2
Joined: Mon 14 Jun 2010 08:58

TStringField and DBRichEdit Problem

Post by rmy » Thu 16 Sep 2010 08:53

Hi,

my Delphi Application has 2 TDBRichEdit components. One is connected to a Blob field, the other to a varchar(1500) field.
In the blob field the data is stored correctly as rtf code, in the varchar field the data is saved as plain text (no rtf code).

So after saving RTF text in the varchar(1500) all formating is lost.

But there's another problem: LockMode of the query is imLockDelayed.
Because of that IBDAC sends an SELECT ... FOR UPDATE WITH LOCK statetment before updating the data.
This statements causes a rollback when the VARCHAR(1500) field is included in the WHERE clause and contains RTF-Code (which is written in the field by a older BDE-working application).

My versions are:
Delphi 7 (Build 4.453) on XP
IBDAC 3.10.0.15
Firebird 2.1 Database (Dialect 1)

The Blobfield is Blob subtype binary imported by the field editor in Delphi as TBlobField
The Varchar(1500) is imported as TStringField
(With BDE it was TMemoField)

thanks in advance
kind regards

Regine
TBlob

AndreyZ

Post by AndreyZ » Thu 16 Sep 2010 13:13

Hello,

When you save text with the RTF code in varchar field the formatting isn't lost. The point is that TDBRichEdit component uses this formatting to display the text. You can check it in the following way:

Code: Select all

ShowMessage(DBRichEdit.Field.AsString);
Where DBRichEdit is bind to varchar field.

I can't reproduce the problem with LockMode=imLockDelayed. Please, send me a complete small sample to andreyz*devart*com to demonstrate the problem, including a script to create a table.

Post Reply