Sql Table Foriegn Key Problem in C#
-
the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table sas
-
the Pronblem is i have a table of employeeinfo having attribuyes EmpID EmpName EmpFatherName GenID now GenID is a primary key of a separate table having two attributes that is GenID Gender the problem is when the form runs displaying 3 textboxes and one combobox the user must select the entry from gender and click save the values must be stored in the table of sql that is Employeeinfo i saved the first three attributes by the following code datarow.["EmpID"] = EmpID.text; but on GenID it gives problem bcoz i want to relate the Gender attribute to the GenID Attribute in the EmployeeInfo table and must be saved in the sql data table sas
Mr.Sajid In ur case: I suppose ur not populating combobox with from a table; that's why u r facing the problem. Regards