More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Wednesday, April 5, 2017 10:46:37 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 11/23/2008(UTC)
Posts: 501

Delphi calculated field and OncalcFields event
Your TDataSet, Ttable or TQuery has AutoCalcFields property set to try, by the event OnCalcFields didn't fire. In the case of a query, you opened the query
Code:
query1.open;
while not query1.EOF do 
query1.next;


You may have missed the definition of the calculated filed, eg.
Code:
    object TblDevDesc: TStringField
      FieldKind = fkCalculated
      FieldName = 'Desc'
      Size = 40
      Calculated = True
    end


TQuery example:
Code:
  object Query1: TQuery
    AfterScroll = Query1AfterScroll
    OnCalcFields = Query1CalcFields
    DatabaseName = 'ARESLITEDB'
    SQL.Strings = (
    ...
    }

    object TblDevDesc: TStringField
      FieldKind = fkCalculated
      FieldName = 'Desc'
      Size = 40
      Calculated = True
    end

Edited by user Wednesday, April 5, 2017 10:48:40 PM(UTC)  | Reason: Not specified

Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.