I am getting “Object reference not set to an instance of an object” when we try to get datatable from itemcollection
SPListItemCollection resultItems=list.GetItems(query);
DataTable resultTable=resultItems.GetDataTable(); // Exception occurs here
Any help would be appreciated.
SPListItemCollection resultItems=list.GetItems(query);
DataTable resultTable=resultItems.GetDataTable(); // Exception occurs here
Any help would be appreciated.