How to update/insert values in a database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satyabhaskar
    New Member
    • Dec 2008
    • 32

    How to update/insert values in a database

    I need ur help,
    Actually im designing a web page for my project in ASP.NET with C#....I got Struck in inserting data into the database from the web page.... I feel i can take forward steps if any one can solve the following example which is not the same project which im doing....
    here if suppose i have my web page with lables EmployeeNumber,
    EmployeeName,Em ployeeAddress,D epartmentName,D epartmentLocati on,Salary,
    DateOfBirth. and i have a insert button..so soon i click the insert button the values or text in the appropriate text boxes should insert into the following appropriate two referenced tables in the database..the two table are

    tblDepartment (base table) with attributes

    DepartmentNumbe r (primary key),Department Name,Department Location

    and

    tblEmployee with attributes

    EmployeeName (primary key),EmployeeNa me,DataOfBirth,
    EmployeeAddress ,DepartmentNumb er (Foreign key),Salary.

    here i need the department details to be inserted into department table and employee details to be inserted into employee table with Department number as reference field...and if this can be solved then i also want to know how can we increment the DepartmentNumbe r for every record we insert into these tables...
    i feel very happy if i will get quick response...
    Thanks
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    What database are you using? You will need to connect to the database, use an sql query and execute it.

    Comment

    • satyabhaskar
      New Member
      • Dec 2008
      • 32

      #3
      im using sqlserver 2000 boss...can u plz solve my problem soon,,,

      thanks.

      Comment

      • PRR
        Recognized Expert Contributor
        • Dec 2007
        • 750

        #4
        Originally posted by satyabhaskar
        im using sqlserver 2000 boss...can u plz solve my problem soon,,,

        thanks.
        You need to provide more information. We can help you with your queries and possibly guide you.

        Take a look at How To Use A Database In Your Program.

        Comment

        • satyabhaskar
          New Member
          • Dec 2008
          • 32

          #5
          ok thanks for the reply boss....

          Comment

          Working...