[Lazarus] MySQL5.1 and Sum(DataLength(FIELD))

Andrew Brunner andrew.t.brunner at gmail.com
Sun Oct 17 04:46:16 CEST 2010


On Sat, Oct 16, 2010 at 8:04 PM, Joost van der Sluis <joost at cnoc.nl> wrote:

> Hmm.. probably not. Or are you accessing the MySQL api directly so that
> you have to parse something? Or are you just using ZEOS or maybe SQLDB
> and a TSQLQuery?

Yes.. The TMySQL51 component for SQLDBLaz (svn today)


>> SELECT SUM(LENGTH(ITMDAT)) as TesT FROM scms_ufls WHERE ITMUID=2 AND ITMKND=1
>>
>> the FieldDef come back with FieldDefs count =1
>> The name looks good.
>
> Fielddef <> Fields. So what is the field-count?

Field count always ZERO.

>> But if I try to access Query.Fields[0] or so, it does not exist.
>
> It does not exist? Do you get an error-message 'Field does not exist'?

Yes. I get error.  Field (even if I use precise field name in DEFs It
still comes back with field not found.  Even if I set name during
query... still field not found.

> Please give some more info, maybe that I can help if you do. ;)

Thanks.  So other than using the laz TMySQL51 Connection and setting
Transaction and Query to stock components I don't know what else to
offer.  Ask more questions :-)




More information about the Lazarus mailing list