Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Sql Table Foriegn Key Problem in C#

Sql Table Foriegn Key Problem in C#

Scheduled Pinned Locked Moved C#
csharpdatabasehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sajid salim khan
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • S sajid salim khan

      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

      R Offline
      R Offline
      Raza Hussain
      wrote on last edited by
      #2

      Mr.Sajid In ur case: I suppose ur not populating combobox with from a table; that's why u r facing the problem. Regards

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups