code to edit a record - InfoPath Dev
in

InfoPath Dev

code to edit a record

Last post 11-05-2005 12:39 AM by Patrick Halstead. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-03-2005 09:48 AM

    code to edit a record

    Does anyone know how to write a function or use a rule to edit a record on an Infopath Form?

    I have an Infopath form with 5 pages(views) and when I select a record, I want to be able to make changes to that record and send the update back to the access db with those updates.

    Each record has a unique ID and I'm familiar with submitting a record. But the update structure I'm struggling with. Using vb.net as the backend program language.

    I want to select a record, make some changes to that record and hit a save button that sends the update back to the db based on the unique id record currently selected.

    The main connection data source is mapped in the data connection gui wizard and i'm hoping that I can somehow just refer to the record selected based on the unique id and update the record when the save command is clicked.

    Do I have to do any Db and recordset references in my code or is it naturally assumed based on the gui wizard data connection. Never worked with half user interface mapped, half programmed, its throwing off my thought process understanding the functionality. Thanks!
  • 11-03-2005 09:56 AM In reply to

    Hi,

    Did you look into Web Services to do this? You can call a WS in your form, pass the record ID and updated values, and do the dirty work (DB update) in the WS.

    Regards,

    Franck Dauché
  • 11-03-2005 10:13 AM In reply to

    I never worked with Web service. I'm thinking your referring to it as a object.event(method). Not sure . Would it be something like this:


    edit Command_ on click()

    reference the UID field.webservice
    locate your position
    with statement
    .update
    .save
    end sub
  • 11-03-2005 11:11 AM In reply to

    Why don't you start there:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/OfficeInfoPathWebServiceASPNET.asp

    Regards,

    Franck Dauché
  • 11-03-2005 11:18 AM In reply to

    Thanks Franck, I'll look it over!
  • 11-03-2005 11:50 AM In reply to

    Looked at this. Seems a bit cumbersome. Don't actually need it to be a web service application at this point and there are some restraints to utilizing this format. I don't have IIS on my profile. I'd have to get a NA involved and I'm not sure what the security risks are?? Also, it gives instructiuons using Visual C# , I'm using Visual Basic.net.

    I guess I'm looking for a more simplistic coding method to update my db.

    Maybe I should invest in a good vb.net book. Like I said though, not sure where to draw the line between Infopath's GUI setups and VB.net coding rules??
  • 11-05-2005 12:39 AM In reply to

    Hi Kip,
    We sell a Database Accelerator that you can use to update your DB with no code. It's very flexible. There is an evaluation version for free underneath Downloads->Free. And the Developer Version starts at $249. Let me know if you have any questions.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.