RAD Studio
ContentsIndex
PreviousUpNext
Declaring the Class Field

A component needs a field for each of its owned classes, as explained in Declaring the class fields. In this case, the calendar needs a field of type TFieldDataLink for its data link. 

Declare a field for the data link in the calendar:

type
  TDBCalendar = class(TSampleCalendar)
  private
    FDataLink: TFieldDataLink;
  .
  .
  .
  end;

 

class PACKAGE TDBCalendar : public TSampleCalendar
{
private:
    TFieldDataLink *FDataLink;
    .
    .
    .
};

 

#include <DB.hpp>
#include <DBTables.hpp>

Before you can compile the application, you need to add DB and DBCtrls to the unit's uses clause.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!