My question is regarding the use of DataTable vs ListItemCollection. Basically I have a small solution, where I have to loop through the items in the list to verify if the items already exists or not.
At this time i'm doing like this, for every item i'm trying to add
libraryName.GetItems(query).Count >= 1
Someone advised me to use GetDataTable, basically DataTable to only retrieve once the data from the SharePoint and then to use it instead ... would it be a better approach? Or is there even better?
Secondly if i will use
DataTable dt = listitemcol.GetDataTabel(); how can i then be able to retrieve data from the datatable what names will the columns have? internalnames or not?
Is it also possible to do a query on datatable with where statement?
Any input is appreciated.