Here is an example of how to concatenate two columns in a DataView or DataSet using a DataView when you can not change the SQL query, which is the best way. But there maybe times when you are using a web service for example where you can not change the query but you want to manipulate the resultant data to create a concatenated field.
Dim sDS As DataSet
Dim sDV As DataView
Dim newColumn As DataColumnTry
sDS = Globals.GetCustomerContactList
sDV = sDS.Tables(0).DefaultView
newColumn =
cmbContacts.ValueMember =
New DataColumn("ContactFullName")
newColumn.Expression = "LastName + ', ' + FirstName"
sDV.Table.Columns.Add(newColumn)
cmbContacts.DataSource = sDV"CustomerContactId"
cmbContacts.DisplayMember = Catch ex As Exception
MessageBox.Show("oh No")
Finally
sDS =
Nothing
sDV = Nothing
newColumn =
End Try