I am trying filter the data out of a DataTable
using the Select
function
Dim dr() As DataRow = Nothing
Dim DtDataSource As DataTable
'value is populated here in DataTable (12,000 Records)
dr = DtDataSource.Select("[Name] like '[PAPER]*'") 'Gives Error
The error is thrown at the last line where I try to get data from the DataTable because I am using block brackets '[' and ']'.
In C# we could use the following code to get around it
dr = DtDataSource.Select("[Name] like '\[PAPER\]*' ESCAPE '\\'");
But if I use the same concept here, it gives the following error
Syntax error: Missing operand after 'ESCAPE' operator.
Now is there anyway through which I can get the data out of DataTable which start with the phrase [PAPER]?