tablefieldname starts unicode with char.
Posted: Tue 15 Nov 2011 07:22
Using WIN 7 and Delphi XE2 and MySql Data Access components v. 7.0.2 trial I am unable to insert when tablefieldname starts unicode with char.
Setting debug on shows this
INSERT INTO STEmployee
(EMPSN, USERID)
VALUES
(?, ?)
:EMPSN(Integer,IN)=51
:USERID(WideString[4],IN)='fdfd'
WELL DONE, BUT
INSERT INTO STEmployee
(EMPSN, `성명`)
VALUES
(?, ?)
:EMPSN(Integer,IN)=52
:`성명`(WideString[4],IN)='FDFD' <-- EMyERROR E.CODE = 1064
Error message : Exception class EMyError with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4'.
Do you have any solution for this problem except change all fieldnames to non-unicode char.?
table structure like this.
CREATE TABLE `stemployee` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`EMPSN` int(11) DEFAULT NULL,
`DIVSN` int(11) DEFAULT NULL,
`USERID` varchar(50) DEFAULT NULL,
`USERPASS` varchar(50) DEFAULT NULL,
`성명` varchar(50) DEFAULT NULL,
`이니셜` varchar(10) DEFAULT NULL,
.
.
.
`메모` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=utf8;
Setting debug on shows this
INSERT INTO STEmployee
(EMPSN, USERID)
VALUES
(?, ?)
:EMPSN(Integer,IN)=51
:USERID(WideString[4],IN)='fdfd'
WELL DONE, BUT
INSERT INTO STEmployee
(EMPSN, `성명`)
VALUES
(?, ?)
:EMPSN(Integer,IN)=52
:`성명`(WideString[4],IN)='FDFD' <-- EMyERROR E.CODE = 1064
Error message : Exception class EMyError with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4'.
Do you have any solution for this problem except change all fieldnames to non-unicode char.?
table structure like this.
CREATE TABLE `stemployee` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`EMPSN` int(11) DEFAULT NULL,
`DIVSN` int(11) DEFAULT NULL,
`USERID` varchar(50) DEFAULT NULL,
`USERPASS` varchar(50) DEFAULT NULL,
`성명` varchar(50) DEFAULT NULL,
`이니셜` varchar(10) DEFAULT NULL,
.
.
.
`메모` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=99 DEFAULT CHARSET=utf8;