Page 1 of 1

Problems with the table having a field named 'Index' in TMSQuery

Posted: Mon 24 Mar 2008 13:44
by Alexander_73
In table having field named 'Index'.
Both of a way: setting of property MSQuery.UpdatingTableName and by SQL Generator at method TMSQuery.Post cause an error: @Incorrect syntax near 'Index'... The error disappears only at editing sql-queries for insert and update by changing name 'Index' on '[Index]'.
In our bases there are hundreds tables containing fields conterminous with reserved words of MS SQL Server, we cannot change all of tables because paying SDAC.

Posted: Mon 24 Mar 2008 14:00
by Antaeus
Set the QuoteNames option of TMSQuery to True.

Posted: Mon 24 Mar 2008 14:23
by Alexander_73
Thanks!