Concatenate Display Member in Bound Combo

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron Ackerman

    Concatenate Display Member in Bound Combo

    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???


  • Tian Min Huang

    #2
    RE: Concatenate Display Member in Bound Combo

    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 misunderstandin g. 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:

    MySqlDataAdapte r.Fill(MyDataSe t)

    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.

    Comment

    • Tian Min Huang

      #3
      RE: Concatenate Display Member in Bound Combo

      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.

      Comment

      Working...