Hello,
a TIBCQuery is connected to a TDBGrid. The query component is feed by user-definable SQL statements, which might include BLOB SUB_TYPE 1 columns. Is there an TIBCQuery option to automatically show the BLOB content in the grid instead of "WIDEMEMO"?
Thanks,
Thomas
TIBCQuery, TDbGrid - Automatically show BLOB SUB_TYPE 1 cont
-
tsteinmaurer
- Posts: 52
- Joined: Thu 17 Dec 2009 08:25
-
AndreyZ
Hello,
You can use the OnGetText event handler of your WIDEMEMO fields in the following way:
You can use the OnGetText event handler of your WIDEMEMO fields in the following way:
Code: Select all
procedure TForm1.OnGetText(Sender: TField; var Text: string; DisplayText: Boolean);
begin
Text := Sender.AsString;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
IBCQuery1.Open;
end;
procedure TForm1.IBCQuery1AfterOpen(DataSet: TDataSet);
var
i: integer;
begin
for i := 0 to DataSet.FieldCount - 1 do
if DataSet.Fields[i] is TWideMemoField then
DataSet.Fields[i].OnGetText := OnGetText;
end;