Does not UniDAC 7.0 compatible with MySQL 5.7?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by joongtang » Wed 18 Jul 2018 03:17

Hello.
I'm using MySQL 5.7.22 database and character set is UTF8.
UniDAC 6.4.16 has been used up to now. This version was no problem.
I installed UniDAC 7.3.9 Trial version today, but Korean text is broken.
What's wrong?

The table creation script is shown below.

Code: Select all

CREATE DATABASE test
CHARACTER SET utf8
COLLATE utf8_general_ci;

CREATE TABLE test.table1 (
  col1 varchar(255) DEFAULT NULL
)
ENGINE = INNODB;

INSERT INTO table1 VALUES ('테스트');
https://imgur.com/a/SNiPSuw

Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by ViktorV » Wed 18 Jul 2018 06:26

To solve the issue, please try to set the property UniConnection.SpecificOptions.Values['UseUnicode'] in True:
UniConnection.SpecificOptions.Values['UseUnicode'] := 'True';

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by joongtang » Wed 18 Jul 2018 06:43

ViktorV wrote: Wed 18 Jul 2018 06:26 To solve the issue, please try to set the property UniConnection.SpecificOptions.Values['UseUnicode'] in True:
UniConnection.SpecificOptions.Values['UseUnicode'] := 'True';
Yes, I set useUnicode option True.

Test Project code is shown below.

Code: Select all

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Vcl.Buttons, Uni, MemDS, DBAccess,
  Vcl.Grids, Vcl.DBGrids, UniProvider, MySQLUniProvider;

type
  TForm1 = class(TForm)
    UniConnection: TUniConnection;
    UniTable: TUniTable;
    DataSource: TDataSource;
    DBGrid1: TDBGrid;
    MySQLUniProvider: TMySQLUniProvider;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

end.

Code: Select all

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 214
  ClientWidth = 335
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object DBGrid1: TDBGrid
    Left = 8
    Top = 80
    Width = 257
    Height = 113
    DataSource = DataSource
    Options = [dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
  end
  object UniConnection: TUniConnection
    ProviderName = 'MySQL'
    Database = 'test'
    SpecificOptions.Strings = (
      'MySQL.UseUnicode=True')
    Username = 'root'
    Server = 'localhost'
    Connected = True
    LoginPrompt = False
    Left = 32
    Top = 16
    EncryptedPassword = 'CEFFCDFFCCFFCBFF'
  end
  object UniTable: TUniTable
    TableName = 'table1'
    Connection = UniConnection
    Active = True
    Left = 104
    Top = 16
  end
  object DataSource: TDataSource
    DataSet = UniTable
    Left = 168
    Top = 16
  end
  object MySQLUniProvider: TMySQLUniProvider
    Left = 248
    Top = 16
  end
end

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by ViktorV » Wed 18 Jul 2018 07:31

Unfortunately, we could not reproduce the specified behavior.
In order for us to be able to give you a detailed answer, we need a sample demonstrating the behavior you mentioned. Therefore, please, compose a full sample with a temporary access to your MySQL server demonstrating the described behavior and send it to us using the contact form https://devart.com/company/contactform.htmls.
Also, please make sure that you inserted data into the table with the enabled UseUnicode option and use UniDAC 7.3.9.

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by joongtang » Wed 18 Jul 2018 07:52

ViktorV wrote: Wed 18 Jul 2018 07:31 Unfortunately, we could not reproduce the specified behavior.
In order for us to be able to give you a detailed answer, we need a sample demonstrating the behavior you mentioned. Therefore, please, compose a full sample with a temporary access to your MySQL server demonstrating the described behavior and send it to us using the contact form https://devart.com/company/contactform.htmls.
Also, please make sure that you inserted data into the table with the enabled UseUnicode option and use UniDAC 7.3.9.
I send sample file by contact form.
please test it.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by ViktorV » Wed 18 Jul 2018 09:33

We have answered you via e-mail.

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by joongtang » Thu 19 Jul 2018 00:03

ViktorV wrote: Wed 18 Jul 2018 09:33 We have answered you via e-mail.
I'm really sorry .
I think my DB had some problem because I restore DB by copying DB file without using mysqldump.
I reinstalled DB and test then it is displayed normally.

I'm really sorry and thanks!!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Does not UniDAC 7.0 compatible with MySQL 5.7?

Post by ViktorV » Thu 19 Jul 2018 09:46

It is good to see that the problem has been solved.
Feel free to contact us if you have any further questions about our products.

Post Reply