You are not logged in.
hi,
i need to add a new field to a record that is declared in a TSQLRecord as array of record and stored as BLOB.
TImmobile = record
Descrizione: RawUTF8;
DatiCatastali: TIDDynArray;
Percorrenza: Integer;
Varia: Integer; <------------------------ NEW FIELD
end;
TImmobili = array of TImmobile;
TSQLConsorzio = class (TSQLRecord)
...
property Immobili: TImmobili read FImmobili write FImmobili;
...
end;
If i insert new TSQLConsorzio it'all ok but when i try to retrieve an "old" TSQLConsorzio i have AV on retrieve.
The database is in production.
How can modify the structure and update the old blob field?
Thanks
Offline
What you did wouldn't work.
I think you should do it this way:
- Do not change the definition of TImmobile and Immobili.
- Add a new type TImmobileNew with the new 'Varia' field added.
- Add a new property ImmobiliNew of type TImmobileNew.
- Migrate the data from 'Immobili' to 'ImmobiliNew'.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
thanks for the reply edwinsn!
for future implementation it might be best to avoid array of record to avoid such situations?in favor of?
thanks a lot!
Emanuele
Offline