Welcome to MSDN Blogs Sign in | Join | Help

Dipper Park

Technical Blogs focus on MOSS 2007, Unified Messaging, Microsoft CRM and BI.
About Submit Infopath form data to Microsoft SQL Server database

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

Posted: Wednesday, July 11, 2007 9:12 AM by Chris Tao

Comments

Photios said:

Nice...

# September 20, 2007 10:25 PM

Clay said:

You can get a suite of installable, prebuilt web services for SQL interaction at http://www.qdabra.com which work with browser forms.

# January 23, 2008 3:49 PM

Uzochukwu Iwuagwu said:

I have been working with infopath for 3 weeks now.Trying to submit data from an infopath form into 2008 sql database.I decided to integrate it with visual studio and see how i could use vb codes to submit data.How can i do this?

# June 23, 2009 9:17 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker