Search code examples
c#sqldatasetoledbdataadapter

Keyword used in Select From SQL Statement (C# OleDbDataAdapter)


I am attempting to read the tables of a database into a dataset. I have a table named "CASE" which causes an error: "Syntax Error in From Clause". Upon further inspection, it would seem that "CASE" is an SQL/Access Keyword. Is there an "Escape Sequence" of sorts that would ignore this (i.e. The "\" in C# strings, or will I have to rename the table?

I have attempted to surround the table name in parenthesis, which didn't work, as well as surrounding the table name in quotes, which threw another error.

Any help/suggestions are greatly appreciated.


Solution

  • Yes, square brackets [KeywordTableName]