Simple C# class to populate datatable from FetchXML

If you want to populate a datatable object with results retrieved from a FetchXML query, there are several differences in how the results are returned compared with a typical SQL query. In this sample I show an easy way to address some of the more annoying ones.

C# (29.8 KB)
 
 
 
 
 
(0)
756 times
Add to favorites
7/5/2013
E-mail Twitter del.icio.us Digg Facebook

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fetch2DataTable", "Fetch2DataTable\Fetch2DataTable.csproj", "{07796437-22A5-4F96-80AD-4D5858C2C732}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{07796437-22A5-4F96-80AD-4D5858C2C732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{07796437-22A5-4F96-80AD-4D5858C2C732}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{07796437-22A5-4F96-80AD-4D5858C2C732}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{07796437-22A5-4F96-80AD-4D5858C2C732}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal