myconnection = New SqlConnection("server=(local);Initial Catalog=stock;Integrated Security=SSPI")
myconnection.Open()
mycommand = New SqlCommand("select cartype,eng,color,price,year,extras,picture,carname from info where sno='" + txtsno.Text + "'", myconnection)
dr = mycommand.ExecuteReader
While dr.Read()
txttype.Text = dr("cartype").ToString()
txteng.Text = dr("eng").ToString()
txtcolor.Text = dr("color").ToString()
txtcarname.Text = dr("carname").ToString()
txtprice.Text = dr("price").ToString()
txtyear.Text = dr("year").ToString()
txtextras.Text = dr("extras").ToString()
txtpics.Text = dr("picture").ToString()
End While
dr.Close()
Dim da As New System.Data.SqlClient.SqlDataAdapter(mycommand)
Dim ds As New DataSet()
da.Fill(ds)
Dim bits As Byte() = CType(ds.Tables("info").Rows(0)("picture"), Byte())
Dim memorybits As New IO.MemoryStream(bits)
Dim bitmap As New Bitmap(memorybits)
PictureBox1.Image = bitmap
myconnection.Close()
iwant to display image stored in picture field bt am gettinf error, plse help me to do this