Search code examples
c#odbcdbfreserved-words

Using DESC as column name in DBF


There is a column name as DESC in a dbf. When I try to use INSERT using C# ODBC it is giving an error as DESC cannot be a valid column name (I think). But I need to use only DESC for that column. How to use it?


Solution

  • Since DESC is a reserved word, you need to enclose the column name in square brackets.

    INSERT INTO MyTable ([DESC]) VALUES ('My Description')