Hi everyone,
I Created a dataset (and a datatable) Im binding three textboxes to the ds. All ok. Now I'm trying to bind a picture (to a picturebox) as well, but that doesn't work. Error message: "Cannot format the value to the desired type". Any suggestions....
Pampers
Keeping it simple can be complicated
I Created a dataset (and a datatable) Im binding three textboxes to the ds. All ok. Now I'm trying to bind a picture (to a picturebox) as well, but that doesn't work. Error message: "Cannot format the value to the desired type". Any suggestions....
Code:
da.Fill(ds, "tblPatient")
Dim dt As DataTable = ds.Tables("tblPatient")
TextBox1.DataBindings.Add("Text", ds.Tables(0), "PatientNameLast")
TextBox2.DataBindings.Add("Text", ds.Tables(0), "PatientNameFirst")
TextBox3.DataBindings.Add("Text", ds.Tables(0), "PatientVerzGeldigTot")
Dim b As New Binding("Image", ds.Tables(0), "PatientPicture")
PictureBox1.DataBindings.Add(b)
Pampers
Keeping it simple can be complicated