Link to home
Start Free TrialLog in
Avatar of jamiguel
jamiguel

asked on

i have problem how pass i to field(image) to an image?

i have problem how pass i to field(image) to an image?
i have these code:
table1.fieldbyname('foto').assign(image1.picture.graphic)
i need invert the process
something image1.picture.graphic:=table1.fieldbyname('foto').value
somebody can help me?
how is the form correct?
Avatar of jamiguel
jamiguel

ASKER

Edited text of question
This should do it

Image1.Picture.Assign(Table1.FieldByName('foto').Value);
Correction

Image1.Picture.Graphic.Assign(Table1.FieldByName('foto').Value);

but you really dont need to use the graphic property, you can just use the picture property. for example

Table1.FieldByName('foto').Assign(Image1.Picture);
and vise versus
i write these code:

image1.picture.assign(table1.fieldbyname('Foto').value);
and
image1.picture.graphic.assign(table1.fieldbyname('Foto').value);

but in both cases mark these error:  (at time of run or compile)
"incompatible types 'Tpersistent' and 'Variant' "

ASKER CERTIFIED SOLUTION
Avatar of heathprovost
heathprovost
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial