Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

VS 2008 Trouble with updating a friends list

$
0
0
Here is the "Update" button(Shows current friends):

Code:

Private Sub UpdateFriends_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateFriends.Click
        MySQLConnection = New MySqlConnection
        MySQLConnection.ConnectionString = "censored"
        MySQLConnection.Open()

        Dim MyAdapter As New MySqlDataAdapter
        Dim SqlQuary = "SELECT * FROM Login INNER JOIN Friends ON Login.ID = Friends.UserID2"
        Dim Command As New MySqlCommand
        Command.Connection = MySQLConnection
        Command.CommandText = SqlQuary
        MyAdapter.SelectCommand = Command
        Dim Mydata As MySqlDataReader
        Mydata = Command.ExecuteReader
        Dim sb As StringBuilder = New StringBuilder()

        Do While Mydata.Read
            sb.AppendLine(Mydata("Username").ToString)
            FriendsList.Text = (sb.ToString)
        Loop
    End Sub

################

Except, in the form, when I hit the button, this happens:

Name:  MtWkN6S.png
Views: 14
Size:  34.2 KB

################

It shows the friends names as it should, but then it shows my name(Xolitude) twice. Any help? :o
Attached Images
 

Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>