Solved

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

Posted on 1998-12-31
5
157 Views
Last Modified: 2010-04-04
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?
0
Comment
Question by:jamiguel
  • 3
  • 2
5 Comments
 

Author Comment

by:jamiguel
ID: 1354009
Edited text of question
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1354010
This should do it

Image1.Picture.Assign(Table1.FieldByName('foto').Value);
0
 
LVL 5

Expert Comment

by:heathprovost
ID: 1354011
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
0
 

Author Comment

by:jamiguel
ID: 1354012
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' "

0
 
LVL 5

Accepted Solution

by:
heathprovost earned 0 total points
ID: 1354013
Sorry about that, I wasnt thinking the correct answer is

Image1.Picture.Assign(TBlobField(Table1.FieldByName('Foto')));

This WILL work, I tested.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question