Android Question adding to existing string

dualznz

Member
Licensed User
Longtime User
Hi all
i am trying to add data to an existing sting
in c# i would just go

B4X:
String J = null;
j = "member1, ";
// when adding more data to exisitng string var
j = j += "member2, ";

how would i do this in b4a, i tired .Append but it dont like it?
 

dualznz

Member
Licensed User
Longtime User
update, i figured it out i had my logic all wrong

new logic is
B4X:
Dim players As String
        resultsfromdb2 = SQLmain.ExecQuery("SELECT * FROM main_profiles WHERE player_team='"  & id & "' ORDER BY player_name ASC")
        If resultsfromdb2.RowCount > 0 Then
            For T = 0 To resultsfromdb2.RowCount - 1
                resultsfromdb2.Position = T
                Dim player As String
                player = resultsfromdb2.GetString("player_name")
                players = players & player & ", "
            Next
            members_list.Text = players
        Else
        End If
        resultsfromdb2.Close

cheers
 
Upvote 0
Top