I want to retrieve data from SQL Server and display into Textbox and DataGrid. I want the data from request box to be display into the textbox and the leftjoin table to be diplayed in datagrid.
con.Open()
cmd.Connection = con
cmd.CommandText = "select * from requestbox left join requisitiondata on requisitiondata.requestdata_id = requisitiondata.requestdata_id where request_box = '" & txtsearch.Text & "'"
cmd.ExecuteNonQuery()
Dim TABLE As New DataTable
With da
.SelectCommand = cmd
.Fill(TABLE)
End With
cbspayment.Text = ("spayment").ToString()
cbsoption.Text = ("soption").ToString()
txtto.Text = ("to1").ToString()
txtsupplier.Text = ("supplier").ToString()
txtterms.Text = ("terms").ToString()
txtreference.Text = ("reference").ToString()
txtfrom.Text = ("from1").ToString()
txtcharge.Text = ("charge").ToString()
ExecuteNonQuerywhen you want to execute a query and are already doing so when you callFill?