MyDAC in Delphi and Lazarus simultaneously

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jisraelpo
Posts: 4
Joined: Wed 19 Oct 2016 18:24

MyDAC in Delphi and Lazarus simultaneously

Post by jisraelpo » Thu 16 Feb 2017 05:23

Hi

Trying to use in Lazarus the same datamodule of delphi....

There are several property in delphi not used in lazarus then when I used the delphi conversion in lazarus tools I have in the log this:

Hint: * Converting file C:\tools\ToolsXE10\DelphiLazarus\Neutral\Lazarus\DataModuleMain.pas *
Hint: * Repairing form file C:\tools\ToolsXE10\DelphiLazarus\Neutral\Lazarus\DataModuleMain.lfm *
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Replaced type "TLongWordField" with "TLargeIntField".
Hint: Removed property "Width".
Hint: Removed property "Height".
Hint: Removed property "OldCreateOrder".
Hint: Conversion Aborted.

Another missed property is FixedChar.

What is the path to use the same datamodule in both IDE's at the less pain ? Why a Mysql Integer field in delphi is generated as TLongWordField and in lazarus as TLargeIntField ?

How to keep a common Model-Controller for both and just the view in every IDE ?

Thanks

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

Re: MyDAC in Delphi and Lazarus simultaneously

Post by ViktorV » Thu 16 Feb 2017 15:07

As these hints are displayed by Lazarus, but not by MyDAC to solve your issue you should contact Lazarus tech support.
Note, in MyDAC for some MySQL types (e.g. INT UNSIGNED) the TLongWordField field is created. You can add the following mapping rule:

Code: Select all

  MyConnection.DataTypeMap.AddDBTypeRule(myIntUnsigned, ftLargeint);
After this, for the MySQL type INT UNSIGNED the TLargeintField field will be created. Please note that to use the myIntUnsigned variable, you should add the MyDataTypeMap unit to the USES clause of your unit.
You can learn more information about Data Type Mapping and its correct usage from the "Data Type Mapping in Data Access Components for Delphi" article in our blog at http://blog.devart.com/data-type-mappin ... nents.html

Post Reply