1 2 3 4 5 6 7 8 9
|
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01109594"><META NAME="lcid" CONTENT="1033"><title>About changing a form's main data source</title><link rel="stylesheet" type="text/css" href="office10.css"><script type="text/javascript" language="Javascript" src="ExpCollapse.js"></script><script type="text/javascript" language="JavaScript" src="inline.js"></script></head><body><p id="ExpandAllLine" class="ExpFav"><a href="#" onclick="ExpandAll()" onkeypress="ExpandAll()" class="DropDown"><img id="picHeader" border="0" src="expandtri.gif" alt="Show All"><span id="ExpandAll">Show All</span></a></p><h1>About changing a form's main data source</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><p>At times, you may need to modify a form to use a different <a href="#" class="glossary" onclick="AppendPopup(this,'OfXmlSchemas')" onkeypress="AppendPopup(this,'OfXmlSchemas')">XML Schema</a>, database server, or Web service before or after deployment. You do not have to modify the <a href="#" class="glossary" onclick="AppendPopup(this,'xdformdefinitionfilexsf')" onkeypress="AppendPopup(this,'xdformdefinitionfilexsf')">form definition file (.xsf)</a> to accomplish this task, however, because with Microsoft Office InfoPath 2003 Service Pack 1 or later, you can change the main data source of your <a href="#" class="glossary" onclick="AppendPopup(this,'xdform')" onkeypress="AppendPopup(this,'xdform')">form</a> through the InfoPath designer.</p><p> The steps you need to take to do this differ, depending on whether your form's main data source is an XML Schema, an XML document, or a data connection.</p><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Change the main data source of a form based on an XML Schema or XML document.</a></p><div id="ExpCol" class="collapsed" border="0">Follow these steps to change the main data source of a form that is based on an XML document or Schema:<ol><li>On the <b class="ui">Tools</b> menu, click <b class="ui">Convert Main Data Source</b>.</li><li>In the <b class="ui">Data Source Wizard</b>, click <b class="ui">Browse</b>, and then, in the <b class="ui">Open</b> dialog box, browse to and select the XML document you want to base the form on. Click <b class="ui">Open</b>.</li><li>In the <b class="ui">Data Source Wizard</b>, click <b class="ui">Next</b>.</li><li>Click <b class="ui">Yes</b> under <b class="ui">Do you want to add another XML Schema or XML document to the main data source?</b> if you want to add another XML Schema or XML document to your form's main data source. Click <b class="ui">Finish</b> if you do not want to add more XML Schemas or XML documents to the main data source.</li></ol> <p>Once you specify the new data source, all dependent data will be mapped to the new data source. If the dependent data cannot be mapped, controls will appear unbound in the view.</p><p><b>Note</b> You cannot change your form's main data source to a data connection if it is based on an XML Schema or XML document. </p></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Change the main data source of a form based on a data connection.</a></p><div id="ExpCol" class="collapsed" border="0">Follow these steps to change the main data source of a form that is based on a data connection.<ol><li>On the <b class="ui">Tools</b> menu, click <b class="ui">Convert Main Data Source</b>.</li><li>Click <b class="ui">Database</b> under <b class="ui">Select the type of data connection you want to use for your form</b> if you want to change the main data source of your form to a Microsoft Office Access or Microsoft SQL Server database. Select <b class="ui">Web service</b> if you want to connect your form to a Web service. Click <b class="ui">Next</b>.</li><li>Follow the steps under one of the following headings, depending on whether you selected <b class="ui">Database</b> or <b class="ui">Web service</b> in step 2.<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Change the main data source of a form to a database.</a></p><div id="ExpCol" class="collapsed" border="0"><ol><li>On the second page of the <b class="ui">Data Source Wizard</b>, click <b class="ui">Select Database</b>, and then, in the <b class="ui">Select Data Source</b> dialog box, browse to and select the SQL Server or Access database you want to base the form on, and click <b class="ui">Open</b>.<p><b>Note</b> If there is more than one table in your database, in the <b class="ui">Select Table</b> dialog box, click the table you want to have as the primary parent table for your form, and then click <b class="ui">OK</b>. </p></li><li>If you want to add more than one table, do the following:<ul><li>Click <b class="ui">Add Table</b>.</li><li>In the <b class="ui">Add Table or Query</b> dialog box, click the table you want to add, and then click <b class="ui">Next</b>.</li><li>In the <b class="ui">Edit Relationship</b> dialog box, make sure the connecting fields are correct. To add a set of connecting fields, click <b class="ui">Add Relationship</b>, select the two fields that are equal when a record in one table is associated with a record in another table, and then click <b class="ui">OK</b>.</li><li>In the <b class="ui">Edit Relationship</b> dialog box, click <b class="ui">Finish</b>.</li><li>In the <b class="ui">Data Source Wizard</b>, click <b class="ui">Next</b>.</li><li>In the <b class="ui">Summary</b> box, make sure that the information matches the options you specified, and then click <b class="ui">Finished</b>.</li></ul></li></ol></div><p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">Change the main data source of a form to a Web service.</a></p><div id="ExpCol" class="collapsed" border="0"><ol><li>Enter the location of the Web Service Description Language (WSDL) for the Web service, and then click <b class="ui">Next</b>.</li><li>If requested, you must specify sample values so that InfoPath can query the Web service and collect more information about it.<p><a href="#" class="DropDown" onclick="Outline2()" onkeypress="Outline2()"><img border="0" src="blueup.gif" alt="Show">How?</a></p><div id="ExpCol" class="collapsed" border="0"><ul><li>Select a parameter, and then click <b class="ui">Set Sample Value</b>.</li><li>In the <b class="ui">Set Value</b> dialog box, type the value for the parameter.</li></ul></div></li><li>On the next page of the wizard, specify the Web service operation that you want to provide the data for your form, and then click <b class="ui">Next</b>.</li><li>In the <b class="ui">Summary</b> box, make sure the information matches the options you specified, and then click <b class="bterm">Finished</b>.</li></ol></div></li></ol><p>Once you specify the new data source, all dependent data will be mapped to the new data source. If the dependent data cannot be mapped, controls will appear unbound in the view.</p><p><b>Note</b> You cannot change your form's main data source to an XML Schema or XML document if it is based on a data connection.</p></div><script type="text/javascript" language="JScript" src="ofvbanl.js"></script><span id="ofVBAISpan" class="ofvbaispan"><iframe id="ofVBAIFrame" frameborder="0" marginheight="0" marginwidth="4" scrolling="auto" width="100%" src="../links/inconAboutChangingDataSource_HV01109594_l.htm"></iframe></span><center><a href="XMLSchemaCopyright_HV01147162.htm">©2003-2004 Microsoft Corporation. All rights reserved.</a>
Permission to copy, display and distribute this document is available at: <a
href="http://r.office.microsoft.com/r/rlidAWSContentRedir?AssetID=XT010988631033&CTT=11&Origin=HV011232471033"
target="_new">http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp</a></center></body></html>
|