1 2 3 4 5 6 7 8 9 10
|
<html dir="ltr"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="assetid" CONTENT="HV01106501"><META NAME="lcid" CONTENT="1033"><title>SharepointListAdapter Object</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>SharepointListAdapter Object</h1><div class="ofvbanav"><span class="ofvbanavreuse" id="seealso" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="properties" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="methods" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="events" onclick="toggleList()" onkeypress="toggleList()"></span><span class="ofvbanavreuse" id="specifics" onclick="toggleList()" onkeypress="toggleList()"></span></div><p>Represents a connection to a SharePoint list or document library. The <b class="bterm">SharePointListAdapter</b> object represents the Office InfoPath 2003 <a href="#" class="glossary" onclick="AppendPopup(this,'xddataadapter')" onkeypress="AppendPopup(this,'xddataadapter')">data adapter</a> for retrieving data from a SharePoint list or document library.</p><h2>Remarks</h2><p><p><b>Note</b> This object model member is not supported when the <b class="ui">Disable Service Pack features</b> option on the <b class="ui">Advanced</b> tab of the <b class="ui">Options</b> dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.</p></p><h2>Using the SharepointListAdapter Object </h2><p>For a <a href="#" class="glossary" onclick="AppendPopup(this,'xdsecondarydatasource')" onkeypress="AppendPopup(this,'xdsecondarydatasource')">secondary data source</a>, the <b class="bterm">SharePointListAdapter</b> object is accessible through the <b class="bterm">QueryAdapter</b> property of a data adapter object. Data adapter objects are accessible through the <a href="xdcolDataObjects.htm" id="HV01021185" lcid=" "><b class="bterm">DataObjects</b></a> collection of the <a href="xdobjXDocument.htm" id="HV01021254" lcid=" "><b class="bterm">XDocument</b></a> object.</p><p>The <b class="bterm">SharepointListAdapter</b> object contains the following properties:</p><table><tr><th>Property</th><th>Description</th></tr><tr><td><a href="xdproName_8_HV01107128.htm" id="HV01107128" lcid=" "><b class="bterm">Name</b></a></td><td>Returns the name of the <b class="bterm">SharepointListAdapter</b> object. </td></tr><tr><td><a href="xdproQueryAllowed_3_HV01106506.htm" id="HV01106506" lcid=" "><b class="bterm">QueryAllowed</b></a></td><td>A read-only property of type <b class="bterm">Boolean</b> that corresponds to the <b class="bterm">queryAllowed</b> attribute in the <a href="#" class="glossary" onclick="AppendPopup(this,'xdformdefinitionfilexsf')" onkeypress="AppendPopup(this,'xdformdefinitionfilexsf')">form definition file (.xsf)</a>. Always returns <b class="bterm">True</b> for the <b class="bterm">SharepointListAdapter</b> object.</td></tr><tr><td><a href="xdproSiteUrl_HV01104049.htm" id="HV01104049" lcid=" "><b class="bterm">SiteUrl</b></a></td><td>A read-only property returning the <a href="#" class="glossary" onclick="AppendPopup(this,'ofURL')" onkeypress="AppendPopup(this,'ofURL')">Uniform Resource Locator (URL)</a> of the SharePoint site that this adapter can query from.</td></tr><tr><td><a href="xdproSubmitAllowed_4_HV01106964.htm" id="HV01106964" lcid=" "><b class="bterm">SubmitAllowed</b></a></td><td>Corresponds to the <b class="bterm">submitAllowed</b> attribute in the form definition file (.xsf). Always returns <b class="bterm">False</b> for the <b class="bterm">SharepointListAdapter</b> object.</td></tr></table><p>The <b class="bterm">SharepointListAdapter</b> object contains the following methods:</p><table><tr><th>Method</th><th>Description</th></tr><tr><td><a href="xdmthQuery_9_HV01106973.htm" id="HV01106973" lcid=" "><b class="bterm">Query</b></a></td><td>Reads data from the <b class="bterm">SharepointListAdapter</b> object.</td></tr><tr><td><a href="xdmthSubmit_5_HV01106978.htm" id="HV01106978" lcid=" "><b class="bterm">Submit</b></a></td><td>Because the <b class="bterm">SharepointListAdapter</b> object is available for receiving data only, this method will always generate a run-time error when it is called on that object.</td></tr></table><h2><a id="#example" name="#example">Example</a></h2><p>In the following example, a reference to the <b class="bterm">SharePointListAdapter</b> object is accessed through the <b class="bterm">QueryAdapter</b> property of a data adapter object by passing the name of the data adapter object to the <b class="bterm">Item</b> property of the <a href="xdcolDataObjects.htm" id="HV01021185" lcid=" "><b class="bterm">DataObjects</b></a> collection:</p><pre><code>var objSPLAdapter;
objSPLAdapter = XDocument.DataObjects("Contacts").QueryAdapter;</code></pre><p>After the reference has been set, you can use the methods of the <b class="bterm">SharePointListAdapter</b> object as shown in the following example, which requeries the SharePoint list or library to update the <b class="bterm">DOM</b> property of the data object:</p><pre><code>objSPLAdapter.Query();</code></pre><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/xdobjSharepointListAdapterObject_HV01106501_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>
|