Try If (cn.State = ConnectionState.Open) Then str = "select lrry_sr_no,lrry_item_name,lrry_item_quantity,lrry_item_weight,lrry_item_unitofmeasurement from lorry_item_detail where lrry_no='" & txtlr3.Text & "'" cmd = New OleDbCommand(str, cn) da = New OleDbDataAdapter(cmd) Dim dta As New DataSet da.Fill(dta, "lorry_item_detail") griditem.DataSource = dta.Tables("lorry_item_detail") Else MsgBox("Connection Is Closed") End If Catch ex As Exception End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)