hey thanks for questions,they really gave me direction.
here its the error message below in red and code
"child list for field books cannot be created"
Private Sub btnsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsearch.Click
'search the database for specific records
sConn = "Data Source=Click\sqlclick;Initial Catalog=bookinvetory;User ID=sa;pwd=sqlserver#1"
Try
If rbAuthor.Checked = True Then
sqlInsert = New SqlClient.SqlConnection(sConn)
selComm = New SqlClient.SqlCommand
selComm.CommandType = CommandType.Text
selComm.CommandText = "select * from books where author = @author"
selComm.Connection = sqlInsert
sqlparam = New SqlClient.SqlParameter("@author", txtSearch.Text)
selComm.Parameters.Add(sqlparam)
sqladapter = New SqlClient.SqlDataAdapter(selComm)
Dim dsselect As New DataSet
sqladapter.Fill(dsselect)
Dim D_bind As Binding
D_bind = New Binding("text", dsselect, "bookid")
txtBookID.DataBindings.Add("text", dsselect, "books.bookid")
'binding code
Dim dabinding As Binding
dabinding = New Binding("Text", sqlDaset, "books")
txtBookID.DataBindings.Add(dabinding)
dabinding = New Binding("Text", sqlDaset, "books")
txtAuthor.DataBindings.Add(dabinding)
dabinding = New Binding("Text", sqlDaset, "books")
txtTitle.DataBindings.Add(dabinding)
dabinding = New Binding("Text", sqlDaset, "books")
txtQuantity.DataBindings.Add(dabinding)
dabinding = New Binding("Text", sqlDaset, "books")
txtpublisher.DataBindings.Add(dabinding)
sqlInsert.Open()
selComm.ExecuteNonQuery()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
sqlInsert.Close()
sqlInsert.Dispose()
End Try
End Sub