InfoPath: Unexpected end of file has occurred. The following elements are not closed: dfs:dataFields, dfs:myFields

Online project management, task software, and free collaboration workspace: AJAXWorkspace
AJAXWorkspace is a free online workspace that offers task tracking software, team collaboration, online calendar, document sharing, and file management for project management and teamwork.

Just stuck in this error for few hours. Finally solved it. Here is the story…

You have InfoPath form with secondary data source (SharePoint) to retrieve some lookup data. 2 possible reasons causing this error.

1. You have unused secondary data source (SharePoint).

2. You are using the secondary data source (Sharepoint). It does not bind it to any control but using code programming to consume the data.


1. Remove unused secondary data source

2. Add hidden control to bind to the secondary data source. Code remain the same.

This seems only happens where I am using SharePoint as my secondary data source. Web services doesn’t have this problem.

Leave a Reply