I've been practicing with C# SQL coding and pulling/inserting data into a database. Now, I'm to the point where I want to edit what's in my tables.
My simple solution was (for testing purposes) was to have a combobox populate with EMP_LNAME, EMP_FNAME (successfully working) and when selected to fill in a series of textboxes with the rest of the data in that row.
My problem is actually getting the EMP_ID from that combobox selection so I can correct use my WHERE EMP_ID = "Combobox Value".
SqlCommand cmdEmpDataFIll = mySQLConn.CreateCommand(); cmdEmpDataFIll.CommandText = "SELECT EMP_ID FROM EMPLOYEE WHERE EMP_ID=" + this.cmbEmpList.SelectedText;
Works great.. now, for those empty textboxes in my forum. How can I associate the primary key (or emp_id) to put back in my where clause for a different command to populate those textboxes?
This post has been edited by 8100 Power: 17 June 2012 - 02:54 PM