Infopath forms that contains connection to database or link outside the share-point site needs to be submit through the Share-point Management site with administrator approval. without it you cannot submit that form otherwise it'll return error "An error occurred while submitting the form." .
Below are the steps to use a full trust form on sharepoint site.Step 1. Open your form in Microsoft Office Infopath
Step 2. In this step we'll publish the form.
1. GoTo File --> publish
2. A dialog box will appear with message "The form template must be saved before it can be published. Click OK to save and Cancel to continue working."
3. Click on "OK" and save this form to a location.
4. Now you'll see a option "Where do you want to publish the form template", enable "To a sharepoint server with or without Infopath form services" option.
5. Now Enter the location of your share point or infopath form services site (ex:-
https://your.sitename.com/)
6. Click on next
7. If a security alert dialog box appears click "Yes" on it.
8. Now if dialog box appears to enter sharepoint site password then enter password in it and click ok.
9. Now wait for some movement , it'll take time to connect to that sharepoint site server.
10. Now on next window enable "Enable this form to be filled out by using a browser" option
11. Also enable "Administrator- approved form template" option
12. Now click on next
13. now select a location and file name for the template form
14. Click on next
15. Again click on next
16. Now click on Publish and then close
So our form template is published to the location we selected.
Step 3. Now in this step we'll upload this published form to sharepoint site.
1. Open your sharepoint Management site
2. Click on "Application Management" option on left side.
3. Now Under "Manage Form Templates" option click on "Upload Form Template" option.
4. Select form template you published earlier using file upload control on form.
5. first click on "Verify" to verify this form (This option is to check any errors on form)
6. If there's no error on form, click upload button.
now our form is uploaded to sharepoint site.
Step 4. The Next step is to Activate it for our site.
1. Open site.
2. Click on Site Action
3. Select Site Settings and then Modify all site settings
4. Select Site Collection Features.You should now see the InfoPath template there as a deactivated feature. Click the 'Activate' button to activate it
Step 5. This step is to add activated form to a form library.
Now once we have created a Forms Library we can go and add our InfoPath form as a content type.
1. From your forms library default view go : Settings -> Form Library Settings -> Advanced Settings.
2. From here, click the radio button to say Yes to the "management of content types". and also enable option "Display as a web page" . click OK.
3. Back in the Form Library Settings find the link to 'Add from existing site content types'. From the list of available content types find the name of your InfoPath form, and click the add button
So that's it, now our form is ready to submit data on web-service. Now open that form library and select your form, fill data in it and click on submit.you can now check this data in database.
Thanks,
Vikas Sharma