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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top