Re: Get corresponding column value

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.



.



Relevant Pages

  • Re: Filter data within a column
    ... Link each of these commands to the employee master table as an outer join on ... you are adding selections to the pay components database they'll ... line per employee code, so the details section is useable. ... > Pay Components are Basic, HRA, TA ...
    (microsoft.public.vb.crystal)
  • JNI:Performance:Suggestions/Advice needed
    ... I have an issue which I am unable to decide on regarding JNI. ... sets (for eg., 4 are related to employee details, 3 are related to ... salary details etc). ... retrieve all the values required for processing. ...
    (comp.lang.java.programmer)
  • web Query with variable or cell value
    ... I am reposting to my original request for some help. ... employee name based on the I.D.. ... I am attempting to retrieve the employee name based on the employee ID ... I am getting better at coding in Excel, but this is new ground for me ...
    (microsoft.public.excel.programming)
  • Re: web Query with variable or cell value
    ... the phone number of an employee based on the employee i.d number (code ... Look into "parameter query" from the Excel help. ... I am attempting to retrieve the employee name based on the employee ...
    (microsoft.public.excel.programming)
  • Re: College finals help! End User input in PL/SQL?
    ... Employee Master File/Table ... Include your program source code with your ... Write a PL/SQL program that will prompt the end-user to enter some ... Trigger which will compute both the Employee Code and the Annual ...
    (comp.databases.oracle.misc)