|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help get record count and moving forward and backwards!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) Hi,
MsgBox(myDataSet.Tables("mydb.test").rows.Count.ToString) Ken -------------- Show quoteHide quote "Adrian" <Adrian@nospamhotmail.com.uk> wrote in message news:dst13q$6ns$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com... > 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) > >
HttpWebRequest
Using Rich Text Box - make a line bold Beginners problem with multiple forms Combobox and Values - Help Please Regex help needed is there a way to do this How to split a form when coding? Bind Enum to ComboBox in GridView Scaling Graphics (Fractal) TopMost Form within a .net application |
|||||||||||||||||||||||