Could not find an answer to my problem of querying a datatable which resulted in 0 records producing an error killing the program. To alleviate the error:
- assigned the dt.select("[column name] like ‘xxxx’ ") to a datarow and removed the copytodatatable.
- create an If statement on the datarow. Cdbl(datarow.Count.Tostring) = 0 'skips the rest of the process if 0 records.
I decided to create this thread in case there are others with the same/similar issue.