Dim S As String = ("Select * from Query1 Where idbook like '" & Me.txt1.Text & _
"%' or namebook like '" & Me.txt1.Text & "%';")
If b_name.Text = "" Then
MessageBox.Show("กรอกข้อมูลก่อน !!")
b_id.Select()
Else
ExecuteSQL("INSERT INTO Query1 (idbook, namebook, bversion, rategory, namecompany, bprice, brent, bprub )" & _
"VALUES" & _
"('" & b_id.Text & "','" & b_name.Text & "','" & bversion.Text & "','" & ComboBox1.Text & "','" & ComboBox2.Text & "','" & cprice.Text & "','" & c_rent.Text & "','" & c_tax.Text & "')")
If MessageBox.Show("ต้องการบันทึกใช่หรือไม่? ", "คำยืนยัน", _
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = vbYes Then
End If
End If
Dim command As New OleDbCommand(S, conn)
Dim adapter As New OleDbDataAdapter(command)
Dim dataSt As New DataSet()
adapter.Fill(dataSt, "idbook, namebook")
DataGridView1.DataSource = dataSt.Tables("idbook, namebook")
txt1.Select()