Hi experts,
I am retriving information from the database, to this form. The form shows all the information from the database i request for. I have this field in the database where the values inserted are 1 and 0. Instead of retriving 1 and 0 to the form, i want to insert images. For value 1 there will be an image and the same for value 0 there will be an image. how will i specify the coding to insert image, and also how will i insert the image (retrive from the C:\ directory)Thsi is how at present of retrivig the information from the database:
String sQuery = "SELECT * FROM License WHERE Name = '"+ label1.Text +"' AND LicenseID = '"+ label2.Text +"'";
SqlCommand cmd = new SqlCommand(sQuery, con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if( dr.Read() )
{
label26.Text = dr[ "Name" ].ToString();
label27.Text = dr[ "Description" ].ToString();
label29.Text = dr[ "price" ].ToString();
label36.Text = dr[ "playcount" ].ToString();
label34.Image = dr[ "AllowPlayOnPC" ].
where the table displays the text and numbers, but now for other fileds i want to display images. How would i go about doing this. I need to insert someything else instead of ToString() for the image, does anyone who what.
Thanks
I am retriving information from the database, to this form. The form shows all the information from the database i request for. I have this field in the database where the values inserted are 1 and 0. Instead of retriving 1 and 0 to the form, i want to insert images. For value 1 there will be an image and the same for value 0 there will be an image. how will i specify the coding to insert image, and also how will i insert the image (retrive from the C:\ directory)Thsi is how at present of retrivig the information from the database:
String sQuery = "SELECT * FROM License WHERE Name = '"+ label1.Text +"' AND LicenseID = '"+ label2.Text +"'";
SqlCommand cmd = new SqlCommand(sQuery, con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if( dr.Read() )
{
label26.Text = dr[ "Name" ].ToString();
label27.Text = dr[ "Description" ].ToString();
label29.Text = dr[ "price" ].ToString();
label36.Text = dr[ "playcount" ].ToString();
label34.Image = dr[ "AllowPlayOnPC" ].
where the table displays the text and numbers, but now for other fileds i want to display images. How would i go about doing this. I need to insert someything else instead of ToString() for the image, does anyone who what.
Thanks