Hi Devart,
I currently changed datatype in one table from smallint to int, changed nothing in sources, the exe runs. BUT: the shown values are corrupted! for example, if the table contains value 666666, the exe shows 11306.
I know, I need to change TSmallintField to TIntegerField. But, I think, the sdac should somehow warn/raise an exception, i find this EXTREMELY dangerous for data validity!
Please help me, how could i avoid the data corruption. The source has >1000000 lines of code and about 100 columns have been changed (typically foreign keys)
Thanks, Ludek.
column datatype changed, no error in app, but corrupted data
solved myself, in custom subclass overriden a protected virtual method
and using one hack (see Hallvard's blog) also replaced the same VMT item directly in TMSQuery. Now I'm getting the errors.
Code: Select all
procedure TMyMSQuery.CheckFieldCompatibility(Field: TField;
FieldDef: TFieldDef);
begin
if (field.datatype = ftSmallint) and (fielddef.datatype = ftInteger) then
DatabaseErrorFmt(SFieldTypeMismatch, [field.DisplayName,
FieldTypeNames[field.DataType], FieldTypeNames[FieldDef.DataType]], Self)
else
inherited;
end;
-
AndreyZ