Corrected names of tables

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flashLAV
Posts: 4
Joined: Mon 25 Jun 2007 08:47
Location: Russia

Corrected names of tables

Post by flashLAV » Fri 13 Jul 2007 12:44

Hi
I try make test table with name ONLY from digits:

(info from DBMonitor)
"SQL Execute: CREATE TABLE `123` (`ID` int(11) NOT NULL auto_increment,...
Complete
SQL Execute: SELECT * FROM `123`
Complete
"

But, when I try insert data to this table - error

"SQL Execute: INSERT INTO 123
(NAME)
VALUES
(?)
:NAME(FixedChar[5],IN)='Peter'
Error
"
After many tests I understood, that the name of the table should not consist only digits.
Image

This restriction MySQL or components?

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

Post by Antaeus » Mon 23 Jul 2007 07:43

You should set the QuoteNames option of you MyQuery/MyTable to True.

flashLAV
Posts: 4
Joined: Mon 25 Jun 2007 08:47
Location: Russia

Post by flashLAV » Mon 23 Jul 2007 15:19

Antaeus wrote:You should set the QuoteNames option of you MyQuery/MyTable to True.
Thanks, now all is normal.

Post Reply