Hi Dw.
I have a MySql server database, and I'm polling data from the database. The problem I'm getting is that when I'm retrieving users activities I only get the first record only which is on Row(0)
or the first record with that username. Suppose I have a database like this:
`-------------------------------------------------
|Activity | ActUser |Username |
-------------------------------------------------
|working |John |Steve |
--------------------------------------------------
|done |thabo |tomas |
-------------------------------------------------
|confirmed|amanda |Steve |
-------------------------------------------------`
Now the problem is retrieving all records with username (Steve)
. In the above example it should be 2 records retrieved one with John and another with amanda.
This is what I have:
Try
Dim dav As New MySqlDataAdabter(("select * from mydatabase.test where Username ='" & yUsername & "'"), rtConn)
Dim dvt As New DataTable
dav.Fill(dvt)
If dvt.Rows.Count > 0 Then
yActivity = dvt.Rows(0).Item("Activity") & ""
yActUser = dvt.Rows(0).Item("ActUser") & ""
REM: I send this data to the client like this:
Dim resp As String
resp = "YTREWQ:<" & yActivity & ">:<" & yActUser & ">"
sendMessage(resp)
End If
Catch ex As Exception
ErrorLog(ex.Message & vbCrLf)
End Try
Any help here because currently I only receive the first record for this user which is the record with John in this case I don't receive with that amanda.
What am I missing/doing wrong here?