Retrive data after insert. - InfoPath Dev
in

InfoPath Dev

Retrive data after insert.

Last post 11-15-2005 10:39 PM by Patrick Halstead. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 11-14-2005 07:21 AM

    • mika
    • Not Ranked
    • Joined on 11-14-2005
    • Posts 5

    Retrive data after insert.

    I have web method, that save data into DB's table when user click the button on form. All ID's of inserted rows generated by DB. How can I retrive this ID to the InfoPath-client?
  • 11-14-2005 09:16 AM In reply to

    Re: Retrive data after insert.

    Hi Mika,

    How are you inserting your data? Maybe you could use a Web Service which would return IDs.

    Regards,

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

    • mika
    • Not Ranked
    • Joined on 11-14-2005
    • Posts 5

    Re: Retrive data after insert.

    Hello,

    Indeed, I've already been using web service. But data source adapters has only send or retrive data, but not together.
  • 11-14-2005 10:20 AM In reply to

    Re: Retrive data after insert.

    Hi Mika,
    When you create a new form, there is an option to create a form from a Web service. This will allow you to do both submit and retrieve.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 11-14-2005 10:25 AM In reply to

    Re: Retrive data after insert.

    Mika,

    If you are confortable with managed code, you can even call a WS from your own code, bypassing the built-in mechanism. But, for now, I would go with what Patrick suggested.

    Regards,

    Franck Dauché
  • 11-14-2005 11:59 AM In reply to

    • mika
    • Not Ranked
    • Joined on 11-14-2005
    • Posts 5

    Re: Retrive data after insert.

    quote:
    When you create a new form, there is an option to create a form from a Web service. This will allow you to do both submit and retrieve.


    Maybe, I inaccurately explain my situation. I have web method, like this:

    [WebMethod]
    public long CreateEntity(XmlNode bizEntity)
    {
    long id = // generation id by bizEntity content;
    return id;
    }


    In infopath form I fill parameters, and send data to data base through this web method (CreateEntity). After inserting data, form must display newly created Id.

    Standard way (creating data adapter in infopath designer) I can only send data. Return parameters from web method is nowhere displayed. Is exist a way to display this data?
  • 11-14-2005 12:00 PM In reply to

    • mika
    • Not Ranked
    • Joined on 11-14-2005
    • Posts 5

    Re: Retrive data after insert.

    quote:
    If you are confortable with managed code, you can even call a WS from your own code, bypassing the built-in mechanism.


    Yes, I write my project on C#. I try call the web method from behavior code, through DataAdapter object. But method DataAdapeter.Query hasn't return values. How can I retrive out and return parameters after execution method?
  • 11-15-2005 12:19 AM In reply to

    Re: Retrive data after insert.

    Hi again,
    Create a new form from the web method. Then you can retrieve and submit. You don't have this option if you try to bind an existing form to a web method via the data connections dialog.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 11-15-2005 02:26 AM In reply to

    • mika
    • Not Ranked
    • Joined on 11-14-2005
    • Posts 5

    Re: Retrive data after insert.

    quote:
    Create a new form from the web method.


    How can I do this? New view can create only from task pane.
  • 11-15-2005 06:18 AM In reply to

    Re: Retrive data after insert.

    Hi,

    I think that Patrick suggested a new template, not a new View.

    Franck
  • 11-15-2005 10:39 PM In reply to

    Re: Retrive data after insert.

    Yes, you'll want to do Start->InfoPath. The Fill Out a Form dialog will appear. Choose Design a Form in lower left corner and choose New from Data Connection in Task Pane. Then choose Web Service and answer the questions. Should work like a charm.

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