delphi读取mysql中编码为GBK的表时乱码的消除
在mysql数据库的连接参数设置中,使用以下下划线部分设置:
ZConnectionJise.Protocol := ssVersion;
ZConnectionJise.Database := ssDbName;
ZConnectionJise.Port := strToInt(ssPort);
ZConnectionJise.HostName := ssHost;
ZConnectionJise.User := ssUser;
ZConnectionJise.Password := ssPwd;
ZConnectionJise.Properties.Add('CodePage=GBK');
ZConnectionJise.Connect;
ZConnectionJise.Protocol := ssVersion;
ZConnectionJise.Database := ssDbName;
ZConnectionJise.Port := strToInt(ssPort);
ZConnectionJise.HostName := ssHost;
ZConnectionJise.User := ssUser;
ZConnectionJise.Password := ssPwd;
ZConnectionJise.Properties.Add('CodePage=GBK');
ZConnectionJise.Connect;