Dt.select("[column name] like '*xxxx*' ").copytodatatable no results error

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:

  1. assigned the dt.select("[column name] like ‘xxxx’ ") to a datarow and removed the copytodatatable.
  2. 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.

Hi @Rookie,

Dt.select("[column name] like '℅xxxx℅'").Copytodatatable()

If you are not using the ℅ it will be consider as =.
So make sure what you are searching value you need before or after anything.

Regards,
Arivu

oops i forgot to include the *