Help get record count and moving forward and backwards!

A

Adrian

Hi

I'm lost! so please help me...

I have the following code

I want to simply retrieve all the record that matches the SQL statement, I
want to know how many records matched and display only one field adata from
each match but also be able to step forward and backwards?!

Dim myConnection As MySqlConnection

Dim myDataAdapter As MySqlDataAdapter

Dim myDataSet As DataSet

Dim mySelectQuery As String = "SELECT aData FROM mydb.test where myNumber
like '%" & txtNum.Text & "%'"

Dim strSQL As String

Dim iRecordCount As Integer

myConnection = New MySqlConnection("server=localhost; user id=root;
password=password; database=mydb")

strSQL = mySelectQuery

myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)

myDataSet = New DataSet

myDataAdapter.Fill(myDataSet, "mydb.test ")

MsgBox(myDataSet.ExtendedProperties.Count.ToString)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top