Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » HowTo bind StaticImage to SQL
HowTo bind StaticImage to SQL [message #43611] Sat, 13 September 2014 06:32 Go to previous message
jerson is currently offline  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?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StaticImage cannot show BMP file
Next Topic: >Port 9(say port 10)
Goto Forum:
  


Current Time: Sat May 18 07:49:17 CEST 2024

Total time taken to generate the page: 0.02577 seconds