Mega Code Archive

 
Categories / Delphi / ADO Database
 

Sql against access tables with special characters in field names, such as #

Question: How do I execute SQL against an Access table that has a special character in a field name, such as a #? Whenever I try my statement I get a "General SQL Error". Answer: Place [] around the field name. Example: SELECT * FROM Table WHERE Table.[Phone #] = '(831)431-1000'