Lots of friends were asking for how to submit form data directly into the SQL Server via Form Services/Form Server, after reading my How to Configure Form Service/InfoPath to allow external SQL Data Connection. Please let me clarify something here:
For browser-compatible form template, there is no direct way to allow the form to submit data into SQL Server, but as a workaround, we can use a data connection that submits data to a Web service that works with the database.
And if you want to submit data directly into the SQL Server using the Infopath client, you must meet the following conditions:
· Forms that are based on this form template must be filled out by using Microsoft Office InfoPath. If the form will be filled out by using a Web browser, the form cannot submit data to a database directly. To configure a browser-compatible form template (browser-compatible form template: A form template that is designed in InfoPath by using a specific compatibility mode. A browser-compatible form template can be browser-enabled when it is published to a server running InfoPath Forms Services.) to submit data to a database, use a data connection that submits data to a Web service that works with the database.
· The primary database table that is used in the main data connection contains a primary key, unique constraint, or unique index.
· Any other database tables that are used with this main data connection have a simple relationship to the primary database table.
For the detail about how to Submit form data to a Microsoft SQL Server database, please read this article directly: http://office.microsoft.com/en-us/infopath/HP101070601033.aspx