Friday, November 28, 2003

An example of how you can programmatically access an InfoPath secondary DataSource and use it requery with a new value.

  

     

//Construct a new command for the second dropdown listbox using a Where clause...

XDocument.DataObjects("SecondaryDataSourceName ").QueryAdapter.Command = originalSQLQuery1 +

            " WHERE Items='" + TestValue + "'"

     

//Requery the data source

XDocument.DataObjects("SecondaryDataSourceName").Query();  

     

//Force the view to refresh

XDocument.View.ForceUpdate();

 


11:00:01 PM