MyQuery.SQL.text property and Chinese characters
Posted: Mon 31 Jan 2011 06:32
Hi,
I have a FoxPro table that has a field that may contain Chinese
characters. I'm copying this table to MySQL using the MyDAC
components (specifically, TMyQuery).
I create a SQL string from the fields and field values of each row in
the FoxPro table and then run MyQuery.ExecSQL;.
For some reasons, it gives me a syntax error near an empty field.
I don't understand this, but realized that the field with the Chinese
characters is next to it. Unfortunately, I'm not clear as to what
format the Chinese characters is stored as.
Does MyQuery.SQL.text support Chinese characters?
Here's the actual SQL text:
insert into article (article,artno,rid,jtype,stype,design,mould,batch,unit,photoid,acctno,price,ucost,mcost,lcost,addcost,desc1,desc2,premark,ldate,user,photo,qmethod,req1,req2,req3,req4,pdesc1,pdesc2,pastdata,sphoto,txmattno,txdate,othref1,mk,uprice_hk,uprice_us,ovdate,kingsing,bom,hqty,uqty,cqty,stonewt,size,ws,factor,artno2,whs,remark,sent,`group`,artset,arttype,artproj,artss,artsp,artclf,tz,ct,ph_height,ph_width,pict_height,pict_width,product,factor2) VALUES ("006723","PSX","","PP","Z","03740","S","0007","PC","","",0,0,0,0,0,"DX","","",'2006/9/15',"Y321","PPZ03740S","","","","","","鑽石寶蓋","","","PPZ","",'1899/12/30',"","",0,0,'1899/12/30',"","",0,0,0,"","","",0,"","","",0,"","","","","","","","","",0,0,0,0,0,0)
And the error is :
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PPZ","",'1899/12/30',"","",0,,'1899/12/30',"","",0,0,0,"","","",0,"","","" at line 1'.
Using MyDAC v6.00.0.3, and MySQL Dev tools 4.50.308.0.
Edmund
I have a FoxPro table that has a field that may contain Chinese
characters. I'm copying this table to MySQL using the MyDAC
components (specifically, TMyQuery).
I create a SQL string from the fields and field values of each row in
the FoxPro table and then run MyQuery.ExecSQL;.
For some reasons, it gives me a syntax error near an empty field.
I don't understand this, but realized that the field with the Chinese
characters is next to it. Unfortunately, I'm not clear as to what
format the Chinese characters is stored as.
Does MyQuery.SQL.text support Chinese characters?
Here's the actual SQL text:
insert into article (article,artno,rid,jtype,stype,design,mould,batch,unit,photoid,acctno,price,ucost,mcost,lcost,addcost,desc1,desc2,premark,ldate,user,photo,qmethod,req1,req2,req3,req4,pdesc1,pdesc2,pastdata,sphoto,txmattno,txdate,othref1,mk,uprice_hk,uprice_us,ovdate,kingsing,bom,hqty,uqty,cqty,stonewt,size,ws,factor,artno2,whs,remark,sent,`group`,artset,arttype,artproj,artss,artsp,artclf,tz,ct,ph_height,ph_width,pict_height,pict_width,product,factor2) VALUES ("006723","PSX","","PP","Z","03740","S","0007","PC","","",0,0,0,0,0,"DX","","",'2006/9/15',"Y321","PPZ03740S","","","","","","鑽石寶蓋","","","PPZ","",'1899/12/30',"","",0,0,'1899/12/30',"","",0,0,0,"","","",0,"","","",0,"","","","","","","","","",0,0,0,0,0,0)
And the error is :
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PPZ","",'1899/12/30',"","",0,,'1899/12/30',"","",0,0,0,"","","",0,"","","" at line 1'.
Using MyDAC v6.00.0.3, and MySQL Dev tools 4.50.308.0.
Edmund