#1 2015-10-20 10:05:36

lele9
Member
Registered: 2011-10-28
Posts: 170

RawUTF8DynArrayContains

Hi,
i have a TMySQLRecord class with a property like this:

 property Proprietari: TProprietari read FProprietari write FProprietari; 

where TProprietari is

TProprietario = record
   RagioneSociale: RawUTF8;
   CodiceFiscale: RawUTF8;
   Indirizzo: RawUTF8;
   Comune: RawUTF8;
   Cap: RawUTF8;
   Telefono: RawUTF8;
end;
TProprietari = array of TProprietario;

i need to get all TSQLRecord IDs where TProprietario.CodiceFiscale is equal to aCodiceFiscale parameter.
i see RawUTF8DynArrayContainsNoCase function and i write this code but doesn't work. Maybe work only on TRawUTF8DynArray?

 aClient.OneFieldValues(TMySQLRecord , 'ID', FormatUTF8('RawUTF8DynArrayContainsNoCase(Proprietari, ?)', [], [aCodiceFiscale]), IDs);

any other idea?

thanks

Offline

#2 2015-10-20 11:23:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,170
Website

Re: RawUTF8DynArrayContains

You are right.
RawUTF8DynArrayContainsNoCase works on TRawUTF8DynArray values, not such custom dynamic arrays.

You could define your own custom function.

Offline

Board footer

Powered by FluxBB