|
|
Home » Community » Newbie corner » HowTo bind StaticImage to SQL
HowTo bind StaticImage to SQL [message #43611] |
Sat, 13 September 2014 06:32  |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Can someone show me how to bind a SQL3 field to a StaticImage control?
I am able to bind the other fields to controls. Problem is with StaticImage fed with filename
This is what I have right now
TABLE_ (RUN)
INT_ (REFNO) PRIMARY_KEY AUTO_INCREMENT
DATE_ (TESTDATE)
INT_ (MODE)
INT_ (RADLEVEL)
INT_ (RADTIME)
INT_ (RADSP)
INT_ (COILS)
STRING_ (IMGFILE ,256)
END_TABLE
and this is how I bind them. gridHist is a SqlArray, siImage is a StaticImage
content in SQL[IMGFILE] is a filename on disk.
History.gridHist.Reset();
SQL * Select(SqlAll()).From(RUN);
History.gridHist.SetTable(RUN);
History.gridHist.AddColumn(TESTDATE, "TestDate");
History.gridHist.AddColumn(IMGFILE, "Image File");
History.gridHist.SetOrderBy(TESTDATE);
History.gridHist.AddCtrl(RADLEVEL, History.stRadLevel);
History.gridHist.AddCtrl(RADSP, History.stAlarmSP);
History.gridHist.AddCtrl(RADTIME, History.stMonTime);
History.gridHist.AddCtrl(MODE, History.stMode);
// History.gridHist.AddCtrl(IMGFILE, History.siImage); this line does not work
// History.gridHist.WhenCursor = THISBACK(ViewEvent); If I use this, I do not get the image corresponding to cursor selection. It is always the first row image.
History.gridHist.Query();
Is there a way to do what I'm trying?
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 18:31:00 CEST 2025
Total time taken to generate the page: 0.01013 seconds
|
|
|