Working with stored procedures using script - InfoPath Dev
in

InfoPath Dev

Working with stored procedures using script

Last post 04-02-2007 08:58 AM by dukodude. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-01-2007 01:50 PM

    Working with stored procedures using script

    I am using Infopath 2003 SP2 and am trying to send a value to a stored procedure in SQL server using a Query in a very simple InfoPath form.

    I created the drop box called ProjectComplete in myFields. There are two values Yes and No

    This is the Code,

    function CTRL2_8::OnClick(eventObj)
    {
    var ChkComplete = XDocument.DOM.SelectSingleNode("my:myFields/my:ProjectComplete");
    XDocument.QueryAdapter.Command = 'execute "dbo"."CheckData" '+ ChkComplete;
    XDocument.Query();
    }

    When I run it I get the following message

    Object doesn't support this property or method
    File:script.js
    Line 24

    and line 24 is
    var ChkComplete = XDocument.DOM.SelectSingleNode("my:myFields/my:ProjectComplete");

  • 04-01-2007 11:33 PM In reply to

    • chang
    • Not Ranked
    • Joined on 03-29-2007
    • Posts 23

    Re: Working with stored procedures using script

    JScript is case-sensitive. Try

    var ChkComplete = XDocument.DOM.selectSingleNode("my:myFields/my:ProjectComplete");

    See the lowercase s in selectSingleNode?
  • 04-02-2007 08:58 AM In reply to

    Re: Working with stored procedures using script

    Thank you so very much. That did the trick.

    I now need to get Info path to send the value

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