Re: Get corresponding column value
- From: "Vadym Stetsiak" <vadmyst@xxxxxxxxx>
- Date: Tue, 16 Oct 2007 12:58:01 +0300
Hello, RP!
If you're talking about WinForms application - combobox control has Tag
property. This property can be used to store arbitrary data.
If employee's select resultset is not large, you can cache employee data
into a data structure ( dictionary with employee code as key) and put that
data structure
into control's Tag property. When user selects value from combobox you'll
perfrom search in the attached dictionary to retrieve Emp data.
OTOH if employee's select results set can be large enough other strategies
of data retrieval have to come into play.
--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com
You wrote on Tue, 16 Oct 2007 08:37:57 -0000:
R> I have a combo box and I am filling Employee Codes in it. I want to
R> retrieve employee first and last name when a user selects an employee
R> code from the combo box. Though it very easy with a single SQL Query,
R> I want to know if there is any other way to get this. I mean if I use
R> following query:
R> Select EmpCode, FirstName, LastName from <Table Name>
R> and use column(o) to fill the combo box. Can I store other values as
R> well in combo box to retrieve them when the user selects a code.
.
- References:
- Get corresponding column value
- From: RP
- Get corresponding column value
- Prev by Date: Re: Get corresponding column value
- Next by Date: Re: Accessing Connected Camera folder without Wia??
- Previous by thread: Re: Get corresponding column value
- Next by thread: Re: Get corresponding column value
- Index(es):
Relevant Pages
|