connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\lppUni.mdb;" Dim ds As New DataSet Dim sql As String = "Select * from LPPUN where studID = '" & TextBox1.Text & "' OR studName = '" & TextBox1.Text & "' OR studCourse = '" & TextBox1.Text & "'" Dim dt As DataTable cnn = New OleDbConnection(connectionString) Try cnn.Open() adptr = New OleDbDataAdapter(sql, cnn) adptr.Fill(ds) adptr.Dispose() cnn.Close() dt = ds.Tables(0) studformGridView.DataSource = dt Catch ex As Exception MsgBox(ex.ToString) End Try studformGridView.Visible = True End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)