Retrieve data for a Infopath list box using stored procedure - InfoPath Dev
in

InfoPath Dev

Retrieve data for a Infopath list box using stored procedure

Last post 09-16-2009 11:02 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-16-2009 02:40 PM

    Retrieve data for a Infopath list box using stored procedure

    Hello all the experts,

    I don't have any experience with info path and this is my first project involved in InfoPath.  Any help would be really appreciated!

    In my InfoPath form, there is a list box, I'd like to populate this list box by using stored procedure but it did not work for me.  Below is what I have but threw error : XDocument.QueryAdapter is null or not an object. BTW, this is Jscript.  Would anybody help me to get it worked and show me how to write this same code in VB as well?

    Thanks in advance!

     

    function msoxd_my_SuperRegions::OnBeforeChange(eventObj)

    { 

     XDocument.QueryAdapter.Command = 'execute "dbo"."GetCountry" ';

    XDocument.Query();

    }

     

  • 09-16-2009 11:02 PM In reply to

    Re: Retrieve data for a Infopath list box using stored procedure

    Hi Somebody,

    Best practice is to use a Web Service. Don't put code in your form. Pass a parameter to the Web Service and have it interact with SQL. Filtering should be done on the server. Qdabra has a free trial of it's WSSP Web Service product. The Web Service is cheap and will save you time and money. You can install it by going to Qdabra.com and Products and click on WSSP. You could also look at DBXL which includes WSSP and also supports submits to SQL.

    Or, you could spend more time and money and write your own Web Service. I guarantee you that doing this in code within the InfoPath form will be the most costly and time consuming way to do it. I know this because 6-7 years ago we did lots of forms like that. Today we just don't put code in the form unless we absolutely have to. Lower maintenance cost and happier customers (since they don't have custom code to maintain in lots of different forms).

    Enough said...

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.