Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2006

Tip: Looking for answers? Try searching our database.

How can I write the code about  getting  the data by using  a data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
How can I write the code - 20 Jan 2006 05:24 GMT
Hi all:

  I created a Data Connection “UXP” by using the Wizard, the information of
the data connections is as follows:

Note: The data source is a SharePoint List

I want to know how I can get the data of the SharePoint List when I click a
button.

How Can I write the code?

public void Connect_OnClick(DocActionEvent e)

{

//I want to get the data of the SharePoint List by using the “UXP” Data
Connection

}

S.Y.M. Wong-A-Ton - 20 Jan 2006 12:45 GMT
How about the following?
---
thisXDocument.DataObjects["UXP"].Query();
IXMLDOMDocument2 xmlDOM =
(IXMLDOMDocument2)thisXDocument.DataObjects["UXP"].DOM;
/* xmlNamespaces lists all relevant namespaces XPath needs for retrieval.
You can find them by retrieving thisXDocument.DataObjects["UXP"].DOM.xml and
copying all the namespaces listed in this XML string */
string xmlNamespaces =
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\"";
xmlDOM.setProperty("SelectionNamespaces", xmlNamespaces);
// Retrieve nodes using XPath
IXMLDOMNodeList nodes = xmlDOM.selectNodes("//dfs:YourUXPXMLNode");

---
S.Y.M. Wong-A-Ton

> Hi all:
>
[quoted text clipped - 17 lines]
> }
>  
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.