Compatibility with Previous Versions
We always try to keep MyDAC compatible with previous versions, but sometimes we have to change the behaviour of MyDAC in order to enhance its functionality, or avoid bugs. This topic describes such changes, and how to revert the old MyDAC behaviour. We strongly recommend not to turn on the old behaviour of MyDAC. Use options described below only if changes applied to MyDAC crashed your existent application.
Values of the options described below should be assigned in the initialization section of one of the units in your project.
The BaseSQL property is similar to the SQL property, but it does not store changes made by AddWhere, DeleteWhere, and SetOrderBy methods. After assigning an SQL text and modifying it by one of these methods, all subsequent changes of the SQL property will not be reflected in the BaseSQL property. This behavior was changed in MyDAC 4.00.2.8. To restore old behavior, set the BaseSQLOldBehavior variable to True.
If the manually assigned RefreshSQL property contains only "WHERE" clause, MyDAC uses the value of the BaseSQL property to complete the refresh SQL statement. In this situation all modifications applied to the SELECT query by functions AddWhere, DeleteWhere are not taken into account. This behavior was changed in MyDAC 5.00.0.4. To restore the old behavior, set the BaseSQLOldBehavior variable to True.
Starting with MyDAC 220.127.116.11, the DataSetChange event is sent after the dataset gets open. It was necessary to fix a problem with disappeared vertical scrollbar in some types of DB-aware grids. This problem appears only under Windows XP when visual styles are enabled.
To disable sending this event, change the value of this variable to False.
Starting with MyDAC 18.104.22.168, if the OnUpdateRecord event handler sets the UpdateAction parameter to uaFail, an exception is raised. The default value of UpdateAction is uaFail. So, the exception will be raised when the value of this parameter is left unchanged.
To restore the old behaviour, set DoNotRaiseExcetionOnUaFail to True.
Control flow functions of MySQL (like IF, CASE) change data type of LONGMEMO and LONGBLOB fields. It causes wrong description of these fields by MyDAC and truncating their data. To avoid these problems, MyDAC tries to restore the correct data type. This behaviour was introduced in MyDAC 22.214.171.124. To disable this behaviour, set the __Strings65535ToMemo variable to False.
This variable has sense for Delphi 2009 and higher.
Set its value to True to use the AsAnsiString property when setting the parameter value through TDAParam.AsString. Otherwise the AsWideString property is used. The default value is False.
Starting with MyDAC 126.96.36.199, when master/detail relationship is used on inserting a new record into master table parameters in detail table are not updated. To restore the old behavior, set the RefreshParamsOnInsert variable to True.