views:

169

answers:

1
  1. Let's say I have a stored procedure in Microsoft SQL Server 2005 that returns a list of values (1 column result set). I want those list of values appear in Infopath (i.e. they are the values of say a dropdown list). How would I do that?
  2. Let's say that I would also use other stored procedures for other dropdown lists.
  3. Let's say I can also call a stored procedure that returns a one valued answer (one row, one column), how can I display that in an Infopath control, say a textbox?

A C# sample solution or a useful web tutorial will be a big help. Thanks in advance for any relevant answers for this question.

+1  A: 

It would really depend on where you are configuring the control. If you do it from the code behind, then you have more flexibility as compared to from the InfoPath UI. You can see how to do it from the UI on:

Use values from a SQL Server database to populate a list box, drop-down list box, or combo box

You can find an example on the InfoPathDev site:

http://www.infopathdev.com/files/folders/examples/entry282.aspx

Jonathan Kehayias