Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-12

Firebird's calculated field

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

I tried to use the FieldKind of Calculated on a real calculated field from firebird, but instead of displaying the data inside the calculated field, it just displayed it it's type as a string.
When I'm using it as Data, then the field content is displayed properly. Is there something that I should do more then just changing the property in order to make it display the content ?

Thanks,
Ido

http://ik.homelinux.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091204/736303ba/attachment.html>

Reply by email

Luca Olivetti
to ik

En/na ik ha escrit:

Show quoted text 5 lines
Hello, I tried to use the FieldKind of Calculated on a real calculated field from firebird, but instead of displaying the data inside the calculated field, it just displayed it it's type as a string.

What do you mean with "real calculated field"?
If the field is calculated by the database itself, to lazarus it's a normal field.
Calculated fields are fields that are not returned by the database and you fill their values in the OnCalcFields event of the dataset component.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

ik
to Luca Olivetti

So what is the difference between internal calculated and calculated in that property ?

Thanks,
Ido
http://ik.homelinux.org/

Luca Olivetti wrote 28 lines
En/na ik ha escrit: Hello, > > I tried to use the FieldKind of Calculated on a real calculated field from > firebird, but instead of displaying the data inside the calculated field, it > just displayed it it's type as a string. > What do you mean with "real calculated field"? If the field is calculated by the database itself, to lazarus it's a normal field. Calculated fields are fields that are not returned by the database and you fill their values in the OnCalcFields event of the dataset component. Bye -- Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007 -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091204/4408f365/attachment.html>

Reply by email

Luca Olivetti
to ik

En/na ik ha escrit:

So what is the difference between internal calculated and calculated in that property ?

The first is a normal field (fkData), the second is an fkCalculated (and now I see there's an fkInternalCalc but I don't know what that's for).

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Martin Schreiber
to ik: So what is the difference between internal calculated and calculated in that property ?…
ik wrote
So what is the difference between internal calculated and calculated in that property ?

fkCalculated: not fetched from DB, not stored in dataset, value must be recalculated on dataset scroll.
fkInternalCalc: not fetched from DB but stored in dataset. Useful to store selection-, filter-, indexing- or other per record data. Implemented in MSEgui only AFAIK.

Martin

Reply by email