Query regarding Update the data using application

I have scenario i need to update single record in the the application and insert into a table
for example
SELECT ContactID,FirstName,MiddleName,LastName,Description FROM Contact
Contact table contains 4 columns as explained. in the application there is one tab called Contact where it displays Above information
and description is non editable.
Now the new requirement has come user can update the description information and save information in a new column say 'Description1'
that means new column needs to be added in the db and also necessary changes needs to be done at the application side
For ex :SELECT ContactID,FirstName,MiddleName,LastName,Description,Description1 FROM Contact
Now when user views the contact table it should display description info by default from 'description' table.
If he edits he should see edited data from 'description1' table.
Can any body guide me please and send me sample update query please, and the logic should if updated data is there display that data from
 'description1' table other wise display from  'description' table
Smash126

Hi Smash126,
You need to fire the update command once you have filled the description record. It should happen on the primary key column of the record.
For Example: 
UPDATE Contact
SET Description  = 'New Description',
Description1 = 'New Description'
where contactID = <<ContactID from application>>
This way both will updated to same value, and next time you will get the updated value.
Here is some ADO.Net links:
http://www.codeproject.com/Articles/1155/Simple-ADO-NET-Database-Read-Insert-Update-and-Del
http://www.onlinebuff.com/article_step-by-step-select-insert-update-and-delete-using-aspnet-c-and-adonet_32.html
Regards Harsh

Similar Messages

  • 'Stale data error' is encountered while trying to update the data using EO.

    Hi,
    I am getting the following error when I am trying to update the data using EO:
    '' Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user. \nAction: Cancel the transaction and re-query the record to get the new data."
    I have tried clearing the corresponding VO cache and have also used the "getTransaction().setClearCacheOnCommit(true)" method in the AM, but the error persists.
    Kindly suggest some work around for this problem.

    Chirag,
    this error is usually.... thrown by framework, if some other user has updated the same record you are trying to update by your EO, just check db, and try for a different record!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How do I get pages 5.2 to automatically update the date - use 10.9.2

    How do I get pages 5.2 to automatically update the date in my documents - before the update I could do this. Does anybody have the knowledge or a workaround.
    If not I will dump pages 5.2 and use my old version!!! this feature is important for any and all businesses using pages??
    Any advice on how to achieve this is greatly appreciated
    I use a number of macs all using OSX
    10.9.2

    I have the same problem.
    What confuses me is that all the apple provided templates in pages seem to auto update their time and date upon opening.
    So there MUST be a way to do it... Ive been unable to work out how...
    Amnon

  • Query regarding alignment of data in Application server

    My requirement is to download data to the application server. To get an aligned output, i need to give offset position manually for each input.
    For example :
          lw_outtab+0(15) = in_itab-matnr.
          lw_outtab+25(10) = in_itab-vkorg.
              append lw_outtab to i_outtab.
            Instead of manualy giving the offset position  
    Is there is any function module to get an aligned output in the Application server directly.
    And also i would like to know if color formating is possible for the downloaded data.
    ...Waiting for ur suggestions.
    Regards,
    Dhana...

    Hi Dhanachezhiyan,
    In order to get alligned data in an outputfile to application server you could do something like this:
    Define your own types (of course you can add as much fields you need)
    TYPES: BEGIN OF ty_in_itab,
             matnr(15) TYPE c,
             buf01(10) TYPE c,
             vkorg(10) TYPE c,
             buf01(10) TYPE c,
           END   OF ty_in_itab,
    Make sure that the length here is equal to length of ty_in_itab
           ty_outtab(100) TYPE c.
    Define your own tables/workarea's
    DATA:  in_itab   TYPE ty_in_itab OCCURS 0 WITH HEADER LINE,
           in_outtab TYPE ty_outtab  OCCURS,
           lw_outtab TYPE ty_outtab.
    Logic to fill in_itab.
        MOVE CORRESPONDING VBAK TO in_itab.
        APPEND in_itab.
    After this filling logic do your trick
      LOOP AT in_itab.
        lw_outtab = in_itab.
        APPEND lw_outtab TO in_outtab.
      ENDLOOP.
    And afterwards download it
    Hope this sample will help you along.
    Regards,
    Rob.

  • Query  to trace who updated the data

    query to trace who updated the data
    date
    and time
    and username

    ahh, ok - there's a few articles around that will assist.
    I suggest first
    you experiment with triggers to familiarise yourself with them:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/triggers.htm#CNCPT118
    this article here explains the process of putting in some audit processes using triggers:
    http://www.oracle-base.com/articles/9i/CompleteDataAudit.php
    it details creating the tables etc and then provides a procedure that will create the trigger text for you for each table you want to audit. it would be good to write your own trigger from scrath in order to learn and understand exactly what's happening, but it's up to you.
    let us know if you encounter any problems and we can help your specific problem

  • Can we update the data of ztable by using the BAPI FM

    Hi Experts,
    Can we update the data of ztable by using BAPI FM  'BAPI_CUSTOMERCONTRACT_CHANGE'.
    Can anyone help this issue.
    regs
    rams

    Hi Ramesh,
    After the BAPI 'BAPI_CUSTOMERCONTRACT_CHANGE' is called, check the return message and use UPDATE <DBTABLE_NAME> command to update the ZTABLE.
    Use COMMIT WORK after the call. If the BAPI is standard BAPI and not a customized BAPI, then it wont update Z Table direclty. You need to build the logic in program to update Z Table.
    Best regards,
    Prashant
    PS : Please reward all helpful answers

  • How to update the data in sqlserver table using procedure in biztalkserver

    Hi,
    Please can any one answer this below question
    how to update the data in sqlserver table using procedure in biztalkserver
    while am using executescalar,typedprocedure getting some warning
    Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
    Please send me asap....
    Thanks...

    Hi Messip,
    A detailed error would have helped us to answer you more appropriately but
    You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
    http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    2013: Inserting RawXML (Whole Incoming XML Message) in SQL database

  • HT4203 I have turned off the Data use on the I-phone 4s but am told by AT&T that data is still being used for applications.  How is this possible. Can someone help me understand this.  Thanks.

    I have turned off the Data use on the I-phone 4s but am told by AT&T that data is still being used for applications.  How is this possible. Can someone help me understand this. 

    I assume you are including the STIX font as part of your epub files?     
    Perhaps the folks who do this blog might be able to help -- they have done some work with font embedding:
    http://www.pigsgourdsandwikis.com/2011/04/embedding-fonts-in-epub-ipad-iphone-an d.html

  • I recently purchased a MacBook Pro and transferred data from my MacBook via Ethernet cable. I did not consolidate my accounts and kept using my MacBook. Can I update the data transfer now using Ethernet and can I consolidate my accounts?

    I recently purchased a MacBook Pro and transferred data from my MacBook using Migration Assistant via Ethernet cable.  I was confused about consolidating my accounts, so I continued to use my old MacBook.  Can I now update the data transfer using the same process and begin using my new MacBook Pro exclusively?  How do I consolidate my existing accounts?
    Thank you.

    Of course. It does everything it did before Yosemite. You just won't be able to send or receive SMS messages with it.

  • Query regarding updation thru a Procedure

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru my Java application.
    The submit procedure saves the XML data in the database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
    I would like to display the new row with the new elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru
    my Java application.
    The submit procedure saves the XML data in the
    database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by
    adding new elements to the same row.This row now
    contains additional XML elements.
    I would like to display the new row with the new
    elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with
    the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
    Khurram

  • How to delete or Update the data in the MEAN table

    Hello Gurus,
    I would like to delete or update the data in the MEAN table...how to do it.
    Precisely I would like to change the status of Main EAN Indicator (field HPEAN).
    Kindly let me know ??
    Rehards
    Senthilll

    programmatically, you may use [BAPI_MATERIAL_SAVEDATA|https://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata&cat=sdn_all] [EAN|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=bapi_material_savedata+ean&adv=false&sortby=cm_rnd_rankvalue]
    Regards,
    Raymond

  • Update the data in user-defined table

    Dear All,
    Is there anyway we can insert / update the data in user-defined table in a batch instead of update it from the interface one by one? Our customer has 1,000+ data need to be imported.
    They are on SAP2007A SP00 PL45, SQL 2005, CA localization. Thanks a lot.
    Regards,
    yuka

    Dear Yuka,
    If it is UDT, you may use any SQL query to insert, update it. It is not under SAP support anyway.
    Thanks,
    Gordon

  • Query regarding updating rows in JTable

    Query regarding updating rows in JTable
    Hello,
    I have a JTable with 6 columns and 1000s of rows (which are data read from flat files)
    I can select 1 or more rows and change the values of the
    columns. each time I do this I need to update the values
    in the flat file.
    Currently I assign the updated Jtable values to a vector
    Vector rowVector = (Vector)defaultModel.getDataVector();
    then I iterate over the vector and compare the values with the (old) data
    in the JTable.
                for(int rowCount = 0; rowCount<rowVector.size(); rowCount++){
                    Vector v = (Vector)rowVector.elementAt(rowCount);
                        //smsList is the Vector that contains the old JTable values
                        for(int i=0; i<smsList.size(); i++){
                                //If colums values have been changed; add that
                                //vector value to another vector
                                selectedsmsList.add(smsList.get(i));
                for(int i=0; i<selectedsmsList.size(); i++){
                         //Update the values in the flat file
                }This works fine except that it takes ages to iterate over the updated vecor and un-updated,old vector; is there any way to directly get the list of rows that were updated in the jtable; so that I can directly do an I/O operation to update the jtablke values?

    Just a suggestion.
    You could add a listener and use a vector of booleans to keep track of the rows that have been changed. You could then iterate through this boolean vector and update the changed rows.
    See
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#modelchange
    Don't know whether this will be helpful.
    Regards, Darryl

  • How to update the data  in database in webdynpro

    I have to update the data in databse table using adaptive rfc in WebDynPro

    Hi,
    You can refer to these links:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
    Update data into SAP Table
    http://help.sap.com/saphelp_nw70/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/d5/1558bfa6aa80499113983e738b1b21/frameset.htm
    Regards
    Inder

  • How to Update the data in R/3 From BW

    Hi All ,
         I Need some suggestion . i want to update the data of MARC table in R/3 from BW . Here data goes from BW to R/3 . so How to do this ? . There are no standard BAPI's in BW for this .
    Thanks
    Prithvi.

    Hi,
    The scenario you are explaining is little opposite to what happens generally. Are you sure, you want to update R/3 from BW?
    If you have to update MARC table that means you have to extend the material for different plants. Try using BAPI_MATERIAL_SAVE_DATA.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

Maybe you are looking for

  • The Best Customer Service EVER!

    Please forgive me if I am posting this in the wrong place, but I am not a blogger, tweeter, facebook user, or otherwise online all day to know how forums and threads work. I also don't know why there is not a simple input link or method on any of the

  • How to get a string or byte array representation of an Image/BufferedImage?

    I have a java.awt.Image object that I want to transfer to a server application (.NET) through a http post request. To do that I would like to encode the Image to jpeg format and convert it to a string or byte array to be able to send it in a way that

  • Error 1310: my monthslong nightmare, my scourge, my nemesis

    Several months ago -- after installing a new version of Adobe Reader, I strongly suspect -- I began having a problem with Acrobat. Every time I log in to any user account on my laptop, an installation program activates, claiming to be "Configuring Ac

  • Printing out to command window project

    hi all, i have a question on this cart program i am making, i wanted to know how to output the results to the command window every time a person clicks on the "current status" of their purchase. I want it to print out like ( 5 boxes purhcased, 4 cds

  • NAPT Firewall, RMI Callbacks and JRMP MultiplexProtocol

    Hi All, I am looking at having an RMI client behind a Network Address Port Translation firewall receive RMI calls back from an RMI server. NAPT makes it impossible for the client to listen for connection coming from the server through the NAPT firewa