Board index » delphi » Help: Getting DBText "Caption" Property

Help: Getting DBText "Caption" Property

I'd like to get the value of a DB Text caption using the component name.

This works for a DBEdit i.e. TDBEdit(blaah).Text, but Delphi won't
recognise TDBText(blaah).Caption (or Text, I've even tried Value !)

any help appreciated, John.

 

Re:Help: Getting DBText "Caption" Property


Hi John,

  mystring:= DBText1.Field.asString;
or
  mystring:= Query1.Fieldbyname('myfield').asString;

Rudy
----------------------------------------------------
J schreef:

Quote

> I'd like to get the value of a DB Text caption using the component name.

> This works for a DBEdit i.e. TDBEdit(blaah).Text, but Delphi won't
> recognise TDBText(blaah).Caption (or Text, I've even tried Value !)

> any help appreciated, John.

Other Threads