How to auto-fill text box from SQL db query - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to auto-fill text box from SQL db query

Last post 06-15-2007 02:48 PM by markf. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-15-2007 02:04 PM

    • markf
    • Not Ranked
    • Joined on 06-15-2007
    • Posts 2

    How to auto-fill text box from SQL db query

    Hello,

     

    New to InfoPath and I am stumped. I am trying to auto-fill a text box

    control with SQL data that would be dependent on two drop-downs and enable a

    user to edit the contents of the text box before submitting the form.

     

    I can pull the data from the SQL db for the two drop-down boxes and can get

    the first value (Ex. ‘Computer1’) to populate the text box but that is all

    that I can get. How can I populate with the remaining computer names in the

    text box based on the input from the two drop-downs?

     

     

    Thanks!

    Mark

     

     

    1) Query #1 = data for drop-down box #1

    2) Query #2 = data for drop-down box #2

    3) Query #3 = data for text box where user can edit server list (Ex.)

    ‘ComputerName’ field is the only thing I want to populate the text box with

    and I use InfoPath data filters to filter on the two drop-downs.

     

     

    Ex.

    Computer1 -> auto-filled

    Computer2 -> auto-filled

    Computer3 -> auto-filled; user deletes this line

    Computer4 -> auto-filled

    Computer5 -> user adds this line

     

     

    Query #1

    SELECT     ApplicationVersionID, ApplicationName, Applicationstatus

    FROM         Applications AS Applications

    ORDER BY ApplicationName

     

    Query #2

    SELECT     EnvironmentID, EnvironmentName

    FROM         Environments AS Environments

    ORDER BY EnvironmentName

     

    Query #3

    SELECT     svr.ComputerName, ap.ApplicationName, env.EnvironmentName

    FROM         Servers AS svr INNER JOIN

                          Allocations AS alloc ON svr.AssetNumber =

    alloc.AssetNumber INNER JOIN

                          Assignments AS asn ON alloc.AssetNumber =

    asn.AssetNumber INNER JOIN

                          Applications AS ap ON asn.ApplicationID =

    ap.ApplicationVersionID INNER JOIN

                          Environments AS env ON alloc.EnvironmentID =

    env.EnvironmentID

     

     

  • 06-15-2007 02:48 PM In reply to

    • markf
    • Not Ranked
    • Joined on 06-15-2007
    • Posts 2

    Re: How to auto-fill text box from SQL db query

    I am wondering now if I went about this the wrong way. Is there another way to bring the results of a SQL query into a form and then to allow a user to edit those results before submitting the form?

    Thanks for any help!
    Mark

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