PC Review


Reply
Thread Tools Rate Thread

Combobox / Display Member / SQL Question

 
 
=?Utf-8?B?U3Rld2FydCBMYW5l?=
Guest
Posts: n/a
 
      9th Aug 2005
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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3Rld2FydCBMYW5l?=
Guest
Posts: n/a
 
      9th Aug 2005
I've found the answer by searching other threads.

No need to reply.



"Stewart Lane" wrote:

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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox Display member Paul Ilacqua Microsoft Dot NET Framework Forms 4 26th Mar 2010 01:23 PM
How to use Display Member and Value Member [roperties of combobox Murtaza Microsoft ADO .NET 0 13th Dec 2007 05:46 AM
Combobox display and value member Nofi Microsoft C# .NET 3 22nd Aug 2006 04:59 PM
Format Combobox Display Member AMDRIT Microsoft VB .NET 2 28th Sep 2005 04:18 PM
Binding two values to combobox display member property Hanumanth Reddy Microsoft C# .NET 2 30th Mar 2005 08:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 AM.