You are not logged in.
Pages: 1
On my application I use this code:
for b := 0 to Length(ContactsRecords.RecordProps.FieldsName) - 1 do
begin
var1 := StringReplace(var1, '[' + ContactsRecords.RecordProps.FieldsName[b] + ']', UTF8ToString(ContactsRecords.GetFieldValue(ContactsRecords.RecordProps.FieldsName[b])), [rfReplaceAll, rfIgnoreCase]);
var2 := StringReplace(var2, '[' + ContactsRecords.RecordProps.FieldsName[b] + ']', UTF8ToString(ContactsRecords.GetFieldValue(ContactsRecords.RecordProps.FieldsName[b])), [rfReplaceAll, rfIgnoreCase]);
var3 := StringReplace(var3, '[' + ContactsRecords.RecordProps.FieldsName[b] + ']', UTF8ToString(ContactsRecords.GetFieldValue(ContactsRecords.RecordProps.FieldsName[b])), [rfReplaceAll, rfIgnoreCase]);
end;
On last version of your framework TSQLRecordProperties.FieldsName is remove, why?
How can I replace my code?
Offline
Due to huge code refactoring of the RTTI handling in mORMot core, TSQLPropInfoList has been introduced: it is an unique entry point for all fields definitions.
It is much more convenient and expandable than the previous implementation.
So you can use ContactsRecords.RecordProps.Fields.Count / ContactsRecords.RecordProps.Fields[] instead of ContactsRecords.RecordProps.FieldsName[].
Offline
Pages: 1