Filter-expression
I will select DataRow from DataTable,
but my filter-expression is not OK.
myDataTable.Select("place = 'La Tour d'Auvergne'"); That does not work, because place includes the apostrophe. What can I do? Please, help me.
I will select DataRow from DataTable,
but my filter-expression is not OK.
myDataTable.Select("place = 'La Tour d'Auvergne'"); That does not work, because place includes the apostrophe. What can I do? Please, help me.
"place =" &
Replace the single apostrophe in the value with two apostrophes (not a single double-quote character):
"place = 'La Tour d''Auvergne'"
This is the same syntax that most databases use in queries.
I hope this information proves helpful.
David Sceppa
ADO.NET Program Manager
Microsoft