To design a form template with a query data connection, you need to do the following:Ĭreate the form template When you create a form template that is based on a database, InfoPath creates a query data connection as the main data connection between the form template and the database. You also need the names of the fields in the child tables that have relationships with the fields in the primary table. If you are going to use more than one table in the database, you need the names of those other, child tables. The name of the table that contains the data that you want to send to the form or that will receive data from the form. The database can use either Microsoft Windows authentication or SQL Server authentication to determine how users can access the database. The authentication required by the database. The name of the database that you will use with this form template. The name of the server that contains the database that you will connect your form template to. In order to design your form template based on a SQL Server database, you need the following information from your database administrator: Therefore, if you are designing a form template based on a SQL Server database and you want your users to submit their form data to the database through the main data connection, you cannot make that form template browser-compatible. However, browser-compatible form templates cannot be configured to allow users to submit data to a database. InfoPath will create a query data connection as the main data connection in a browser-compatible form template. When you design a form template that is based on a database, you have the option of designing a browser-compatible form template. If InfoPath enables the submit data connection, you can customize the submit options for the forms that are based on this form template. When InfoPath enables the submit data connection, users are allowed to submit the data in the data fields in the main data source to the database. None of the data fields in the main data source of the form store a large binary data type InfoPath will disable the submit data connection if the query includes fields that can store a large binary data type, such as pictures, images, OLE objects, file attachments, the Office Access memo data type, or the SQL Text data type. The left table in each pair of related tables in the main data source contains a primary key At least one of the relationships for every pair of related tables must include a primary key from the left table. To allow users to submit data in a form that is based on a browser-compatible form template, use a Web service that works with the database. The form template is not a browser-compatible form template InfoPath will not create a submit data connection in the main data connection if you are designing a browser-compatible form template. Find links to more information about data sources in the See Also section.Ī form can submit data to a database through the form's main data connection if the form template that the form is based on and the database meet the following requirements: You can only add fields or groups to the root group in the main data source. The results of the query are put into data fields, which can be edited through controls that are bound to these fields.īecause the data structure of the query and the data fields must match the way that data is stored in the database, you cannot modify these fields or groups in the main data source. The database returns the results of the query back to the form through the query data connection. InfoPath then sends the query through the query data connection. When a form based on this form template uses the main data connection, InfoPath creates a query by using the data in the query fields. Query fields contain the data that is entered by a user to limit the query results to records that match the data in the query fields. These fields and groups correspond to the way that data is stored in the tables in the database. When you design a form template that is based on a database, Microsoft Office InfoPath creates a main data source with groups that contain query fields and data fields and a query data connection as the main data connection for the form template. Depending on your goals for the form, a data connection might query or submit form data to an external data source, such as a Microsoft SQL Server database or a Web service. In this articleĪ form can have one primary data connection, called the main data connection, and it can optionally have one or more secondary data connections. You can design a form template that can work with a Microsoft SQL Server database to either query data or query and submit data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |