TMSTable - problem with field names that start with a number

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yylee
Posts: 2
Joined: Wed 29 Apr 2009 23:11

TMSTable - problem with field names that start with a number

Post by yylee » Sun 07 Feb 2010 04:46

Hi

I have a table that has a few fields that are named as '1XL_Size' and '2XL_Size'. When I insert new records via the TMSTable component, it returns an 'Incorrect Syntax near '1'' error. I am sure that '1' is from the 1XL_Size field. I try re-naming the fields in the component as [1XL_Size], but when the application starts it complains about this field not present. Any idea how to get around this?

thanks
David

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 08 Feb 2010 07:56

To solve the problem try to set the TMSTable.Options.QuoteNames property to True.

yylee
Posts: 2
Joined: Wed 29 Apr 2009 23:11

Post by yylee » Tue 09 Feb 2010 04:21

it works, thank you!

Post Reply