| | |
Retrieving data from a sharepoint list using CAML query - returning uneeded fields
Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 41
Reputation:
Solved Threads: 0
hi, i am trying to retreive data from a sharepoint list but its returns all columns such as ows_MetaInfo, ows__ModerationStatus ,ows__Level ows_ID ,ows_owshiddenversion, ows_UniqueId ,ows_FSObjType
rather than just the fields i want from the list.
I thought the "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> tag would filter these colums out
Can any1 help?
heres my code:
cheers
rather than just the fields i want from the list.
I thought the "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> tag would filter these colums out
Can any1 help?
heres my code:
RSS, Web Services and SOAP Syntax (Toggle Plain Text)
webreference.Lists myList = new webreference.Lists(); myList.Credentials = new NetworkCredential(Username, Password, Domain); // myList.Url = "http://193.82.85.1/HelpDesk/_vti_bin/lists.asmx"; XmlDocument xmlDoc = new XmlDocument(); XmlNode ndQuery = xmlDoc.CreateElement("Query"); XmlNode ndViewFields = xmlDoc.CreateElement("ViewFields"); XmlNode ndQueryOptions = xmlDoc.CreateElement("QueryOptions"); ndQueryOptions.InnerXml = "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" + "<DateInUtc>FALSE</DateInUtc>" + "<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>/>"; ndViewFields.InnerXml = "<FieldRef Name='Title' /> <FieldRef Name='SRDetail'/> <FieldRef Name='Priority'/> <FieldRef Name='Raised_x0020_By'/> <FieldRef Name='Date_x0020_Raised'/> <FieldRef Name='Category'/> <FieldRef Name='Centre'/> <FieldRef Name='ResolutionType' />"; ndQuery.InnerXml = "<OrderBy><FieldRef Name='Date_x0020_Raised'/></OrderBy>"; //"<Query><Where><Eq><FieldRef Name='Raised_x0020_By' /><Value Type='Text'>ddlRaisedBy.Value</Value></Eq></Where></Query>" XmlNode nodeListItems = myList.GetListItems("{002DD75F-2F5A-407C-95A7-2C8CC7156C58}", "{3D3A5BB0-4994-4D64-891C-24D6ECB31991}", ndQuery, ndViewFields, "5", ndQueryOptions, null); XmlReader reader = new XmlNodeReader(nodeListItems); DataSet ds = new DataSet(); ds.ReadXml(reader); // GridView1.DataMember = "yourmembers"; GridView1.DataSource = ds.Tables[1]; GridView1.DataBind();
cheers
Last edited by julseypart; 34 Days Ago at 8:22 am.
![]() |
Similar Threads
- Retrieving data from a sharepoint list using CAML query - returning uneeded columns (XML, XSLT and XPATH)
- Example of Inserting and Retrieving data from xml file (ASP.NET)
- retrieving data from sqlserver2000 in tree structure in jsp (JSP)
- Error while retrieving data from the drop down list (JSP)
- inserting and retrieving data from a datarow in C# (C#)
- retrieving data from MySQL (PHP)
- Problem with retrieving data from access 2003 (Visual Basic 4 / 5 / 6)
- Table query returning error -- help! (MS SQL)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: Plz solve the error
- Next Thread: Credit Card Acceptence
| Thread Tools | Search this Thread |
.htaccess 301 accept access alltop api authentication binarysecuritytoken blog card collaboration credit data development ebay email evernote flash google government highrise htaccess intel internet legal live netbeans patent paypal php podcast proxy redirect rss rssfeeds searchmonkey server service soap software swappingxmlfromflash swappingxmlnodes url web webservices webservicesecurity wiki wikipedia xerces xml xslt y!os yahoo ydn





