Concatenate Display Member in Bound Combo

  • Thread starter Thread starter Aaron Ackerman
  • Start date Start date
A

Aaron Ackerman

Is there any way to concatenate a display member in a bound combo (ex:
FirstName & LastName) or do I merely have to have a field called FullName in
my dataset from the get go and bring that over???
 
Hello Aaron,

Thanks for your post. As I understand, you want to combine two column of a
table into one in the DataSet and display it. Please correct me if there is
any misunderstanding. Now I'd like to share the following information with
you:

SQL statement "Select" supports combining several columns into one with "+"
and "AS" clause. Please refer to the following sample:

SELECT LastName + ' , ' + FirstName AS FullName FROM Employees

As in this case, you can fill the CommandText of SelectCommand in your
SqlDataAdapter with such SQL statment. Right click you SqlDataAdapter and
choose the menu "Preview Data" to verify whether or not it works. And then,
you can create its corresponding DataSet object and fill it with the code
below:

MySqlDataAdapter.Fill(MyDataSet)

Please let me know the result.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Aaron,

Does the information I post last time help you resolve the problem?

Have a good day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top