Pic from database as label.image

Status
Not open for further replies.

hygor

Daemon Poster
Messages
833
i have created a multiple choice test as part of a project I am doing at the moment in VB.net ... i have got randomised questions working and am dead happy... apart from one thing! many of my questions (which are loading from a database) have a picture stored in a cell in a column I have called Qpic.

I am really unsure how to reference this picture when getting the question and possible answers!

To get the picture I have tried an SQL query (like the ones i used to get the question for the random question number generated (q)).
pc.Open("select Qpic from test1 where Qno =" & q, CN)
I have then tried to get the picture to be the image of a label (PicBox) on my form... it doesnt like what I have tried!

The SQL works fine for my string based queries. for example:
rs.Open("select QText from test1 where Qno =" & q, CN)
Qtion = rs.GetString
rs.Close()
QuestionDisp.Text = Qtion
The above works perfectly... but I just cant figure out how to load the image for the same question number (q)

if anyone can help me, it would be much appreciated
 
Status
Not open for further replies.
Back
Top Bottom