Sub btnSave_Click(sender As Object, e As EventArgs)
Dim objConn As New SqlConnection
Dim objCmd As New SqlCommand
Dim dtReader As SqlDataReader
Dim strConnString,strSQL As String
strConnString = "Server=localhost;Uid=sa;PASSWORD=;database=mydatabase;Max Pool Size=400;Connect Timeout=600;"
objConn.ConnectionString = strConnString
objConn.Open()
'*** DataTable ***'
Dim dtAdapter As SqlDataAdapter
Dim dt As New DataTable
strSQL = "SELECT * FROM customer WHERE CustomerID = '"& Request.QueryString("CustomerID") &"' "
dtAdapter = New SqlDataAdapter(strSQL, objConn)
dtAdapter.Fill(dt)
If dt.Rows.Count > 0 Then
Me.Image1.ImageUrl = dt.Rows(0)("Image")
End IF
End Sub