My DB:
CREATE DATABASE `test`
My Table:
CREATE TABLE `test` (
`id` int(11) NOT NULL auto_increment,
`Name` char(50) default NULL,
`Date` date default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=gbk;
My Code:
procedure TForm1.FormCreate(Sender: TObject);
begin
MyConnection1.Connected := true;
MyTable1.Active := true;
end;
procedure TForm1.MyConnection1AfterDisconnect(Sender: TObject);
begin
MyQuery1.SQL.Text := 'set names gbk';
MyQuery1.Execute;
end;
when I enter GBK chars Error occured, what should I do?
Pb with MyDAC5 + Dephi 2007 Pro (GBK)
To set a character set for the current connection, you should use the Charset options of TMyConnection.
> How to make the DBExpress Work with GBK (MySQL Database 5 )?
If you are using DbxMda, the extended driver option Charset will be useful for you. See description of the extended driver options in the ReadMe.html of DbxMda.
> How to make the DBExpress Work with GBK (MySQL Database 5 )?
If you are using DbxMda, the extended driver option Charset will be useful for you. See description of the extended driver options in the ReadMe.html of DbxMda.