You need to sign in to do that
Don't have an account?
IWyatt
Help Adding QueryResult to DataTable
Hey all, I am using Visual Studio 2008 and working in .NET 3.5.
I'm relatively new to programming, so I don't have a lot of background, but I am hoping someone can explain how to take the Values from the QueryResult object and get them into a datatable.
I've examined the sforce explorer, and the apex explorer(virtually identical), and they use some sort of XML serialization that I am not familar with.
Is there another way to fill the datatable with the object's values?
I will primarily be working with the Lead object.
Thanks,
IW
DataSet ds = new DataSet();
ds.ReadXml(Your XML stream here);
Your results are now in the second table in your dataset. i.e. ds.Tables[1] or ds.Tables["records"]
Cheers
All Answers
Hey all, based on the lack of response, I'm guessing that working with XML is the best method for retrieving data.
Are there any walk-throughs or code examples for basic retrieving of lead information, and then parsing the XML result for that data to load into a data table?
Thanks,
IW
You can open a datatable from an XML document. Look on MS site:
http://msdn.microsoft.com/en-us/library/fx29c3yd.aspx
DataSet ds = new DataSet();
ds.ReadXml(Your XML stream here);
Your results are now in the second table in your dataset. i.e. ds.Tables[1] or ds.Tables["records"]
Cheers