Good day,
Can any one please help me to concantenate rows from my ms access database using vb.net. I have a table in ms access where there are contacts of clients, so now i want to seleect only mobile numbers of all clients and then concantenate them seperated by deliminated commas. I realy new to this and i'm not realy sure of how to acchieve this. Any solution that will give me all the mobile numbers into a single row/line seperated each number with a deliminated comma. I have tried different methode but it gives my endless errors. Amongst other things i tried to bind the mobile numbers in to a listbox so that i can loop through and insert all the number in the textbox seperating them with a deliminated commas....that does not work it says "Operator '+' is not defined for type 'DataRowView' and string ";".
This is the code i have used:
Dim address As String
' Dim n As Integer
For i As Integer = 1 To Mobile_PhoneListBox.Items.Count - 1 Step 1
Mobile_PhoneListBox.SetSelected(i, True)
address = address + Mobile_PhoneListBox.Items(i) + ";"
Next i
AddressTextBox.Text = Mobile_PhoneListBox.Items(0) + ";" + address
All i need is to concatenate the rows in mobile column and seperate them by ";", please help?
Thanks in advance
Can any one please help me to concantenate rows from my ms access database using vb.net. I have a table in ms access where there are contacts of clients, so now i want to seleect only mobile numbers of all clients and then concantenate them seperated by deliminated commas. I realy new to this and i'm not realy sure of how to acchieve this. Any solution that will give me all the mobile numbers into a single row/line seperated each number with a deliminated comma. I have tried different methode but it gives my endless errors. Amongst other things i tried to bind the mobile numbers in to a listbox so that i can loop through and insert all the number in the textbox seperating them with a deliminated commas....that does not work it says "Operator '+' is not defined for type 'DataRowView' and string ";".
This is the code i have used:
Dim address As String
' Dim n As Integer
For i As Integer = 1 To Mobile_PhoneListBox.Items.Count - 1 Step 1
Mobile_PhoneListBox.SetSelected(i, True)
address = address + Mobile_PhoneListBox.Items(i) + ";"
Next i
AddressTextBox.Text = Mobile_PhoneListBox.Items(0) + ";" + address
All i need is to concatenate the rows in mobile column and seperate them by ";", please help?
Thanks in advance