Hi Patrick,
Thanks for the response, I appreciate your help. I have not changed schema to cause this issue, I am still in development /test mode, for this I followed following steps -
1. Create table (T1) with two columns
2. Create a view (V1) to select recods from T1 (I need to use view because for my final design I need to merge multiple tables etc).
3. Create a simple stored proc to return all records from V1 (I need stored proc to return data to infopath as the data need to be filter on complex logic for my final design).
4. Create new Infopath with Main data connection based on view V1.
5. Customize Query Button to execute stored Proc of step-3 for querying data.
Strange observation is - above setup works fine if I base Main connection of Form on table T1 insted of view V1. Based on error message it seems some how stored proc is returning reference to table T1 insted of view V1 when I execute SPROC through XDocument.Query() as highlighted below -
Element '{http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}Table1 is unexpected according to content model of parent element '{http://schemas.microsoft.com/office/infopath/2003/dataFormSolution}dataFields'.
Expecting: {http://schemas.microsoft.com/office/infopath/2003/ado/dataFields}View1.
Any thoughts ?
Thanks, again, appreciate your help greatly.
Amit