Submit form data to a Microsoft SQL Server database InfoPath 2007

Author: mety Labels::



When you design a form template that is based on a Microsoft SQL Server database, the Data Connection Wizard enables a submit data connection to the database if the following conditions are met:

If the database meets these requirements, InfoPath enables the submit data connection and adds a Submit button to the Standard toolbar and a Submit command to the File menu on the form.
You can choose to disable the submit data connection in the wizard when you design a form template that is based on a database. If you disable the submit data connection in the wizard and then later you decide that you want to use this submit data connection, you can enable the submit data connection by modifying the main data connection. This article discusses how to enable that submit data connection.
Note You can have a submit data connection only in the main data connection to a database. You cannot add a submit data connection to the form template that is a secondary data connection to a database. If you want to use a submit data connection to a database as a secondary data connection, use a Web service that works with the database, and then add a submit data connection to that Web service.
After you enable the submit data connection, you can also customize the submit options for your form template in the following ways:
  • Change the text that appears on the Submit button on the Standard toolbar and the Submit command on the File menu.
  • Change the keyboard shortcut for the Submit button on the Standard toolbar and the Submit command on the File menu.
  • Create custom messages to display to your users when they submit their forms.
  • Specify whether to leave the form open, close the form, or open another blank form after the form is submitted.


Step 1: Enable the submit data connection

  1. On the Tools menu, click Data Connections.
  2. In the Data Connections dialog box, click the main data connection, and then click Modify.
  3. In the Data Connection Wizard, click Next.
  4. On the next page of the wizard, select the Enable submit for this connection check box, and then click Finish.

Step 2: Configure the submit options

After you enable the submit data connection, InfoPath adds the Submit button to the Standard toolbar and the Submit command to the File menu. InfoPath also configures the forms that are based on this form template to display a message to users after they submit their completed forms. The message states whether the form was successfully submitted. By default, InfoPath also keeps the forms open after users submit them. To change the text that appears on the Submit button, as well as the behavior that occurs after users submit their forms, do the following:
  1. On the Tools menu, click Submit Options.
  2. To change the name of the Submit button that appears on the Standard toolbar and the Submit command that appears on the File menu when users fill out the form, type the new name in the Caption box in the Submit Options dialog box. Tip If you want to assign a keyboard shortcut to this button and command, type an ampersand (&) before the character that you want to use as a keyboard shortcut. For example, to assign ALT+B as the keyboard shortcut for the Submit button and command, type Su&bmit.
  3. If you do not want people to use a Submit command or the Submit button on the Standard toolbar when they fill out your form, clear the Show the Submit menu item and the Submit toolbar button check box.
  4. By default, after users submit a form, InfoPath keeps the form open and displays a message to indicate if the form was successfully submitted. To change this default behavior, click Advanced, and then do one of the following:
    • To close the form or create a new blank form after the user submits a completed form, click the option that you want in the After submit list.
    • To create a custom message to indicate if the form was successfully submitted, select the Use custom messages check box, and then type your messages in the On success and On failure boxes. Tip Use a message in the On failure box to tell users what to do if they cannot submit their form. For example, you can suggest that users save their form and contact someone for further instructions.
    • If you do not want to display a message after the user submits a form, clear the Show success and failure messages check box.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2