Board index » delphi » tibdataset.fieldbyname('').Asstring

tibdataset.fieldbyname('').Asstring

Hi, i don't know if i'm doing this very good.

I'm reading a data from a string field with a TIBDataSet in this form:

Label.Caption:=TIBDataSet.FieldByName('NAME').AsString;

and i receive "PETER                  " and i expect to receive
"PETER"

any sugestion?

Thank you

 

Re:tibdataset.fieldbyname('').Asstring


Your underlying data type is a CHAR and not a VarChar.  Set the TField's
FixedChar to false or use AsTrimString.

Quote
Cristina wrote:

> Hi, i don't know if i'm doing this very good.

> I'm reading a data from a string field with a TIBDataSet in this form:

> Label.Caption:=TIBDataSet.FieldByName('NAME').AsString;

> and i receive "PETER                  " and i expect to receive
> "PETER"

> any sugestion?

> Thank you

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads