Web Listing A: Importing a Picture Private Sub btnSetPicture_Click( _ ByVal sender As System.Object, ByVal e As System.EventArgs) Try OpenFileDialog1.ShowDialog() Dim strImageFilePath As String = OpenFileDialog1.FileName Dim fsImageFile As New FileStream(strImageFilePath, _ FileMode.Open, FileAccess.Read) Dim bytImageData(fsImageFile.Length() - 1) As Byte fsImageFile.Read(bytImageData, 0, bytImageData.Length) fsImageFile.Close() Dim dr As CustomerDataSet.GetCustomersByStateRow dr = CustomerDataSet.Tables("GetCustomersByState").Rows( _ Me.GetCustomersByStateBindingSource.Position) dr.Photo = bytImageData dr.Notes = OpenFileDialog1.FileName Me.Validate() Me.GetCustomersByStateBindingSource.EndEdit() Me.GetCustomersByStateTableAdapter.Update( _ Me.CustomerDataSet.GetCustomersByState) Catch exIOR As IndexOutOfRangeException MsgBox("Add customer before setting picture.") Catch exCon As DBConcurrencyException MsgBox("Update did NOT complete.") End Try End Sub