Open Table named User

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
olsonware
Posts: 3
Joined: Mon 02 Jul 2007 16:28

Open Table named User

Post by olsonware » Thu 23 Aug 2007 13:53

Hello,

I have a SQL 2005 database with a table named USER. When I use the TMSTable component and try to connect to this table, I get the following error:

Incorrect syntax near the keyword 'User'.

I am assuming this is because User is a SQL Keyword, however, I would think it is also very common to name a table USER.

Any suggestions? This is an existing production application so I do not have the option of renaming the table.

Doug Olson

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 27 Aug 2007 06:50

Please set the TMSTable.Options.QuoteNames to True.

olsonware
Posts: 3
Joined: Mon 02 Jul 2007 16:28

Post by olsonware » Tue 02 Oct 2007 18:07

Your suggestion still does not work... My only option is to use a TMSQuery component and construct the individual SQL myself... (much work since the User table changed recently)

Doug

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 05 Oct 2007 13:51

We have reproduced this problem. The investigation of the problem is in progress. As soon as we solve it, we will let you know.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 15 Oct 2007 10:29

We have fixed this problem. This fix will be included in the next SDAC build. Please watch for announcements at the forum.

sailorman
Posts: 3
Joined: Sun 31 Jul 2011 10:46

Post by sailorman » Sun 31 Jul 2011 11:41

I am using SDAC 5.10.8.0 for Delphi 7 Trial and the same error appears
was it realy fixed or am I doing something wrong?

sailorman
Posts: 3
Joined: Sun 31 Jul 2011 10:46

Post by sailorman » Sun 31 Jul 2011 12:15

Please ignore the previous post, TMSTable.Options.QuoteNames does work

Post Reply