Update database record - InfoPath Dev
in

InfoPath Dev

Update database record

Last post 09-19-2010 09:54 PM by Tuomo Ilonen2. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-17-2010 03:40 AM

    Update database record

    I have a database-form with InfoPath 2007. Completing the form requires input from two persons, so the process is following:

     1) Person A fills in a request and submits data to database and as a mail attachment to person B

     2) Person B opens the form from office outlook and approves it by clicking "Approve" button. "Approve" button should then update one field value in the record from "pending" to "approved". After that the updated record should be send to database (and of course overwrite the record that person A originally submitted there).

     Problem is that person B gets primary key violation error. I think it's because the form is trying to create new record instead of just updating the existing one. How do I get the record updated?? Please help me, thanks!

     NOTE: Primary key gets generated automatically based on person A name and now()-function when he opens empty form. Submitting to database in step 1 is a must.

  • 09-17-2010 04:57 AM In reply to

    My guess would be that the xml that is being sent via email has no information about the existence of a record in the database. Because of that, Person B submits and tries to generate a new record, with the same primary key, which generates the error.

    Are you submitting to SQL first or to email?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 09-19-2010 09:54 PM In reply to

    Thanks ErnestoM, your guess was correct and form was easy to fix. Many thanks!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.