developer_mahmoud
Well-known member
- Joined
- Nov 13, 2010
- Messages
- 64
- Programming Experience
- 1-3
hi
i use the following code to retrieve picture from a database in to picturebox but i need the next and previous buttons to navigate through records
CON.Open()
Dim sql As String = "Select * from student where rollno=@rollno"
Dim cmd As New OleDbCommand(sql, CON)
cmd.Parameters.AddWithValue("@rollno", TextBox5.Text)
Dim dr As OleDbDataReader = cmd.ExecuteReader()
If dr.HasRows Then
dr.Read()
TextBox6.Text = dr("name").ToString()
Dim data As Byte() = DirectCast(dr("photo"), Byte())
Dim ms As New IO.MemoryStream(data)
PictureBox1.Image = Image.FromStream(ms)
End If
CON.Close()
i use the following code to retrieve picture from a database in to picturebox but i need the next and previous buttons to navigate through records
CON.Open()
Dim sql As String = "Select * from student where rollno=@rollno"
Dim cmd As New OleDbCommand(sql, CON)
cmd.Parameters.AddWithValue("@rollno", TextBox5.Text)
Dim dr As OleDbDataReader = cmd.ExecuteReader()
If dr.HasRows Then
dr.Read()
TextBox6.Text = dr("name").ToString()
Dim data As Byte() = DirectCast(dr("photo"), Byte())
Dim ms As New IO.MemoryStream(data)
PictureBox1.Image = Image.FromStream(ms)
End If
CON.Close()