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. Database & SysAdmin
  3. Database
  4. ANY SUGGESION....

ANY SUGGESION....

Scheduled Pinned Locked Moved Database
database
6 Posts 4 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.
  • A Offline
    A Offline
    anujbanka1784
    wrote on last edited by
    #1

    I AM SAVING DATA OF A EDITOR ON THE BUTTON CLICK. IN TABLE WE HAVE THREE COLUMNS DEPARTMENT DATA , DEPARTMENT ID . AND I AM PICKING DEPARTMENT ID FROM DEPARTMENT SELECTED IN DROPDOWNLIST.. AND I M SHOWING SELECTED DEPARTMENT DATA IN EDITOR. NOW I WANT IF USER EDIT THIS DATA . AND CLICK ON THE BUTTON DATA AGAIN SAVE IN THE TABLE WITH SAME ID IS IT POSSIBLE… GIVE ANY SUGGESION OR QUERY THNX IN ADVANCE.

    M A 2 Replies Last reply
    0
    • A anujbanka1784

      I AM SAVING DATA OF A EDITOR ON THE BUTTON CLICK. IN TABLE WE HAVE THREE COLUMNS DEPARTMENT DATA , DEPARTMENT ID . AND I AM PICKING DEPARTMENT ID FROM DEPARTMENT SELECTED IN DROPDOWNLIST.. AND I M SHOWING SELECTED DEPARTMENT DATA IN EDITOR. NOW I WANT IF USER EDIT THIS DATA . AND CLICK ON THE BUTTON DATA AGAIN SAVE IN THE TABLE WITH SAME ID IS IT POSSIBLE… GIVE ANY SUGGESION OR QUERY THNX IN ADVANCE.

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Turn your caps off - it is the equivalent of walking up to someones desk and SHOUTING in their ear. It is also really painful to read!

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • A anujbanka1784

        I AM SAVING DATA OF A EDITOR ON THE BUTTON CLICK. IN TABLE WE HAVE THREE COLUMNS DEPARTMENT DATA , DEPARTMENT ID . AND I AM PICKING DEPARTMENT ID FROM DEPARTMENT SELECTED IN DROPDOWNLIST.. AND I M SHOWING SELECTED DEPARTMENT DATA IN EDITOR. NOW I WANT IF USER EDIT THIS DATA . AND CLICK ON THE BUTTON DATA AGAIN SAVE IN THE TABLE WITH SAME ID IS IT POSSIBLE… GIVE ANY SUGGESION OR QUERY THNX IN ADVANCE.

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        Yes, its called an UPDATE

        Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

        A 1 Reply Last reply
        0
        • A Ashfield

          Yes, its called an UPDATE

          Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

          A Offline
          A Offline
          anujbanka1784
          wrote on last edited by
          #4

          mu question is on clicking the same button can we add the data with same id . for update we have to use other button.

          R A 2 Replies Last reply
          0
          • A anujbanka1784

            mu question is on clicking the same button can we add the data with same id . for update we have to use other button.

            R Offline
            R Offline
            Rupesh Kumar Swami
            wrote on last edited by
            #5

            why not you create a extra variable which hold the ID of the department. set -1 for new department. If you edit any saved department, then replace -1 to ID of saved department. And finally on button click, check whether variable is equal to -1 then use insert query, otherwise use Update query

            Rupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11

            1 Reply Last reply
            0
            • A anujbanka1784

              mu question is on clicking the same button can we add the data with same id . for update we have to use other button.

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              This is a somewhat stupid question, it all depends on your database design - if the id is a primary key then no, otherwise yes.

              Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

              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