Always returning the same result - InfoPath Dev
in

InfoPath Dev

Always returning the same result

Last post 07-25-2005 01:30 AM by bobstery. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-20-2005 04:02 AM

    Always returning the same result

    I have a web service that inserts a row into the database and returns success or failure based on whether the row already exists in the Database. When calling the following for the response of the web service :

    XDocument.UI.Alert(XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/tns:insertNumberResponse/tns:insertNumberResult").text);

    I always get the same response as not entered in this case 0, even if the record is inserted.

    However if I call the webservice from my Web browser I can see the XML returned does give differing results, when successfully entering a new row.

    Any ideas?
  • 07-20-2005 12:45 PM In reply to

    Re: Always returning the same result

    hi bobstery,
    Where do you have this above statement after querying the webservice(probably you might have done this after querying the webservice, just a confirmation).
    Do one thing, put "("/dfs:myFields/dfs:dataFields/tns:insertNumberResponse/tns:insertNumberResult")" this field on the InfoPath UI and check what is the result in the UI.

    Or debug your webservice when you are calling the webservice method from the InfoPath, and see what output does that webservice return on success.

    Otherwise i see no reason for message being wrong.

    Agni
    InfoPath Dev India
  • 07-21-2005 08:11 AM In reply to

    • tgo
    • Not Ranked
    • Joined on 06-30-2005
    • Posts 16

    Re: Always returning the same result

    You say you insert a row and then check whether it exists? so wouldnt that find itself and then always return true?

    Unless that the insertNumberResult covers that and I just do not know about it you will need a separte query to check whether it exists.
  • 07-21-2005 10:56 AM In reply to

    Re: Always returning the same result

    I dint mean to insert another row, I just advised him to put insertNumberResult in the UI and check the result instead of using UI alert, so that it would be easy to debug/know the result.

    Agni
    InfoPath Dev India
  • 07-22-2005 08:14 AM In reply to

    • tgo
    • Not Ranked
    • Joined on 06-30-2005
    • Posts 16

    Re: Always returning the same result

    quote:
    Originally posted by bobstery

    I have a web service that inserts a row into the database and returns success or failure based on whether the row already exists in the Database.


    I was not refering your to post I was refering to what he had quoted.
  • 07-25-2005 01:30 AM In reply to

    Re: Always returning the same result

    I have now fixed the problem. tgo you are right I stated that I inserted a row and then checked to see if it was a success or failure, however I should have stated that a row only gets inserted if the request is successful.

    I started a fresh infopath form and instead of using Submit and retrieve, I just used retrieve.

    Many Thanks for your replies.
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.