#1 2023-12-11 06:55:24

bigheart
Member
Registered: 2014-08-01
Posts: 53

CreateMissingTables function return error for MySql

Hello,

When i connect the DB and execute CreateMissingTables(), then error is returned as below:

  TMyOrm = class(TOrm)
  private
    FCode: RawUTF8;
    FCode_name: RawUTF8;
    FCheck_item: Boolean;
  published
    property Code: RawUTF8 index 10 read FCode write FCode;
    property Code_name: RawUTF8 index 80 read FCode_name write FCode_name;
    property Check_item: Boolean read FCheck_item write FCheck_item;
  end;

FConnectProp := TSQLDBZEOSConnectionProperties.Create(
    TSQLDBZEOSConnectionProperties.URI(dMySQL, FHostIp + ':' + FPort), FDBName, FUserId, FPasswd);
  
FModel := TOrmModel.Create([TMyOrm]);
VirtualTableExternalRegisterAll(FModel, FConnectProp);

FOrmServer := TRestServerDB.Create(FStockBaseModel, SQLITE_MEMORY_DATABASE_NAME, False);

FOrmServer.CreateMissingTables(); <== Here is exception occurred 'Unknown MySQL data type!'

**) The actual return error funtion is ConvertMySQLHandleToSQLType() in ZDbcMySqlUtil.pas

Help me how to solve this problem.

Offline

#2 2023-12-11 07:45:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: CreateMissingTables function return error for MySql

Sounds more like a ZDBC issue than a mORMot issue...

What is the SQL executed at that time on MySQL?
Which version on ZDBC are you using?
On which OS and which compiler?

Offline

#3 2023-12-11 07:55:11

bigheart
Member
Registered: 2014-08-01
Posts: 53

Re: CreateMissingTables function return error for MySql

OS: windows 10
Delphi : XE5
ZeosLib : 7.3

SQL : "show variables like '''version''"

Offline

#4 2023-12-11 08:08:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: CreateMissingTables function return error for MySql

This is a Zeos/ZDBC statement.
Try a newer version of Zeos.

You may ask on the Zeos forum for assistance.
https://zeoslib.sourceforge.io/viewforu … ed8232f730

Offline

Board footer

Powered by FluxBB