Combo box Foriegn key problem
-
guys third time posting the question but in vain i have a table Employee Info in sql 2000 having attributes EmpID EmpName GenID GenID is a foriegn key of table Gender having attributes GenID and Gender this.cGender.displaymember = "Gender"; till here every thing is okay but here the problem arises the following code is not working why {this.cGender.valuemember = "GenID";} i need this code to run bcoz i have to save the value of gender in the Employeeinfo accoridng to following code datrow.["EmpID"]= Emp.text; datrow.["EmpName"]= EmpName.text; datrow.["GenID"]= cGender.SelectedValue; sas
-
guys third time posting the question but in vain i have a table Employee Info in sql 2000 having attributes EmpID EmpName GenID GenID is a foriegn key of table Gender having attributes GenID and Gender this.cGender.displaymember = "Gender"; till here every thing is okay but here the problem arises the following code is not working why {this.cGender.valuemember = "GenID";} i need this code to run bcoz i have to save the value of gender in the Employeeinfo accoridng to following code datrow.["EmpID"]= Emp.text; datrow.["EmpName"]= EmpName.text; datrow.["GenID"]= cGender.SelectedValue; sas
Try writing the code without databinding to get it to work first. It is a good why to identify the exact problem. Also, without rewriting set a breakpoint on the last line datrow.["GenID"]= cGender.SelectedValue; and examine what is actually in memory.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
Try writing the code without databinding to get it to work first. It is a good why to identify the exact problem. Also, without rewriting set a breakpoint on the last line datrow.["GenID"]= cGender.SelectedValue; and examine what is actually in memory.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest HemingwayThanx I will try It SAS