Query for single item, rather than storing entire table in InfoPath - InfoPath Dev
in

InfoPath Dev

Query for single item, rather than storing entire table in InfoPath

Last post 12-17-2012 09:38 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-13-2012 11:51 AM

    Query for single item, rather than storing entire table in InfoPath

    I am currently connecting to a SQL Server successfully with InfoPath 2010, but I'm connecting to a table that has over 90,000 entries.  In my InfoPath form I only require 1 line item (5 values from the line item to be exact, 1x5) to be returned, but have discovered that InfoPath wants to store all 90,000+ items in memory (90,000x5) THEN select the 1 line I need.  Once this 1 line is selected, and the 5 values extracted, InfoPath STILL keeps the data intact when I save the file.  Talk about overkill.

     Does anyone know of a way to query for a single line item similar to how it is done in SQL?  IE Select item1, item2, item3 from table ABC where this=that.  I prefer a codeless option.

    My goal is to simplify how users enter their data: Enter a part number, have InfoPath find the description, cost, and a few other values for ONLY that part number.  All this needs to be a browser based form as well, running in SP2010.

     Gil

  • 12-17-2012 09:38 PM In reply to

    Re: Query for single item, rather than storing entire table in InfoPath

    We typically do not recommend using DB connections for the main data source, as this imposes limitations on the layout of the main data source and limits the form in other ways as well.

     What we recommend is to query the database through a webservice using a secondary data source.  We have developed a generic webservice (QueryDB, part of DBXL) that people have found quite useful.  Other options would include using a secondary data connection to SQL Server and using either code or qRules to modify the SQL query and query the database.  The latter options require a bit more caution, as you need to guard against SQL injection.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.