Passing a parameter from the form to a SQL Stored Procedure in InfoPath 2007 - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Passing a parameter from the form to a SQL Stored Procedure in InfoPath 2007

Last post 05-17-2011 01:01 PM by Steph11. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-17-2011 09:21 AM

    Passing a parameter from the form to a SQL Stored Procedure in InfoPath 2007

    Hi - I have the need to retrieve the email address of the manager of the name entered into a Contact Selector control. When the user chooses a user, I'd like the pass the AccountId value into the stored procedure and store the value returned in another control. I have the stored procedure working and returning information, but I have not yet figured out how to pass in a parameter from the form so that it can be dynamic. If anyone has experience with this or advice, please let me know. I'm not planning to use any code-behind, but if that is the only solution, please let me know as well. Thanks in advance.
  • 05-17-2011 01:01 PM In reply to

    Re: Passing a parameter from the form to a SQL Stored Procedure in InfoPath 2007

    If you don't want to write code you could do this by filtering a secondary data connection. Let's say that your secondary data connection returns all the records from your table (accountId and emailaddress). Your first control would be bound to the accountid value and your second control would be bound to the emailadress filter by the value from your main data connection (accountid). In this case you are not passing a parameter to the sql stored procedure but just filtering the data in InfoPath.

    If you want to pass the parameter to the stored procedure you could do this with a web service or using code behind with the AdoQueryConnection's Command property. 

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