Combobox / Display Member / SQL Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stewart Lane

    #1

    Combobox / Display Member / SQL Question

    Can the display member of a combobox who's datasource is a dataset generated
    from a SQl command in a data adpater BE SET to the concatenation of two
    fields, like fname+' '+lname?

    This is my SQL command:
    SELECT custnumb, fname, lname FROM custmstr ORDER BY lname, fname

    I've also tried:
    SELECT custnumb, fname+' '+lname as flname FROM custmstr ORDER BY lname,
    fname (and trying to set the display member to flname - but it wasn't
    available even after I regenned the dataset)

    Basically, I want to combine fname and lname and display this concatenation
    in a combobox so a user can select which customer to begin editing in the
    form.

    Thanks in advance for any pointers.

    Stewart



  • Stewart Lane

    #2
    RE: Combobox / Display Member / SQL Question

    I've found the answer by searching other threads.

    No need to reply.



    "Stewart Lane" wrote:
    [color=blue]
    > Can the display member of a combobox who's datasource is a dataset generated
    > from a SQl command in a data adpater BE SET to the concatenation of two
    > fields, like fname+' '+lname?
    >
    > This is my SQL command:
    > SELECT custnumb, fname, lname FROM custmstr ORDER BY lname, fname
    >
    > I've also tried:
    > SELECT custnumb, fname+' '+lname as flname FROM custmstr ORDER BY lname,
    > fname (and trying to set the display member to flname - but it wasn't
    > available even after I regenned the dataset)
    >
    > Basically, I want to combine fname and lname and display this concatenation
    > in a combobox so a user can select which customer to begin editing in the
    > form.
    >
    > Thanks in advance for any pointers.
    >
    > Stewart
    >
    >
    >[/color]

    Comment

    Working...