J
JohnDBCTX
Guest
Hello,
I am using the ADO libraries.
Which library type should I use within the ADO namespace?
What I want to perform is to perform a search throughout its data on its data grid view control.
Here is the following code snippet below:
Now the next steps that I want to perform are the following:
Create a either a For...Next structure block
Using a command text method
Using an accumulator variable until all rows are being read.
Users key in a data in a text box
if data matches within the data grid view then
a message prompt would state "Match found"
otherwise A prompt message would state, "No Match"
Regards,
JohnDBCTX
Private Sub SearchButton_Click(sender As Object, e As EventArgs) Handles SearchButton.Click
Dim connetionString As String
Dim oledbCnn As OleDbConnection
Dim oledbAdapter As OleDbDataAdapter
Dim ds As New DataSet
Dim sql As String
connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\users\johnd\Documents\MyDatabase.mdb;"
sql = "SELECT [TableOne].[FieldOne] FROM [TableOne];"
oledbCnn = New OleDbConnection(connetionString)
oledbAdapter = New OleDbDataAdapter(connetionString, oledbCnn)
End Sub
jp
Continue reading...
I am using the ADO libraries.
Which library type should I use within the ADO namespace?
What I want to perform is to perform a search throughout its data on its data grid view control.
Here is the following code snippet below:
Now the next steps that I want to perform are the following:
Create a either a For...Next structure block
Using a command text method
Using an accumulator variable until all rows are being read.
Users key in a data in a text box
if data matches within the data grid view then
a message prompt would state "Match found"
otherwise A prompt message would state, "No Match"
Regards,
JohnDBCTX
Private Sub SearchButton_Click(sender As Object, e As EventArgs) Handles SearchButton.Click
Dim connetionString As String
Dim oledbCnn As OleDbConnection
Dim oledbAdapter As OleDbDataAdapter
Dim ds As New DataSet
Dim sql As String
connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\users\johnd\Documents\MyDatabase.mdb;"
sql = "SELECT [TableOne].[FieldOne] FROM [TableOne];"
oledbCnn = New OleDbConnection(connetionString)
oledbAdapter = New OleDbDataAdapter(connetionString, oledbCnn)
End Sub
jp
Continue reading...