ANY SUGGESION....
-
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.
-
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.
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
-
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.
-
Yes, its called an UPDATE
Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
mu question is on clicking the same button can we add the data with same id . for update we have to use other button.
-
mu question is on clicking the same button can we add the data with same id . for update we have to use other button.
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
-
mu question is on clicking the same button can we add the data with same id . for update we have to use other button.