i split a string and store at listbox.The problem that i face now is how to add 4 new column at existing table("customer") and put the listbox data into these 4 new column.
Can any1 teach me or show me the code?
thanks....

Assuming that the "table" is a DataTable object, then adding columns is very easily done.

'Assuming that the customer table is a DataTable object called dTable.
'First add the four new columns with a datatype of String
dTable.Columns.Add("data1", GetType(String))
dTable.Columns.Add("data2", GetType(String))
dTable.Columns.Add("data3", GetType(String))
dTable.Columns.Add("data4", GetType(String))

'Next, iterate through all the rows and add the information from the listbox to
'the four columns respectively.
For Each row As DataRow In dTable.Rows
   row("data1") = listbox1.Item(0)
   row("data2") = listbox1.Item(1)
   row("data3") = listbox1.Item(2)
   row("data4") = listbox1.Item(3)
Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.