DataTable.Select problem

  • Thread starter Thread starter Alex Markov
  • Start date Start date
A

Alex Markov

When I read table from Excel to DataTable object and one
of the field's names is with "?" (for example "class?")at
the end Select function throws the folowing exception:

"...
An unhandled exception of
type 'System.Data.SyntaxErrorException' occurred in
system.data.dll

Additional information: Cannot interpret token '?' at
position 6.
...."
What can I do to be able to perform Select even with names
like these: "class?", "class ".
 
Try enclosing the field names in square brackets and see
if this works. Instead of : "class?", "class " ...
Try: "[class?]", "[class ]" ...

Behram
 
Back
Top