[fpc-pascal] Primitive Record Wrappers

Mazola Winstrol mazofeifer at gmail.com
Thu Feb 18 12:54:50 CET 2016


2016-02-18 8:00 GMT-02:00 leledumbo <leledumbo_cool at yahoo.co.id>:

> > What do you think about it? Is there any other solution?
>
> There's a reason why
> http://www.freepascal.org/docs-html/3.0.0/fcl/db/tfield.isnull.html is
> invented
>
>
You didnt understand my point. Design classes coupled with DB framework is
not a solution.

In the following class


type
   TPerson = class(TObject)
   private
      FId: Integer;
      FName: String;
      FBirthDate: TDateTime;
   public
      property Id: Integer read FId write FId;
      property Name: String read FName write FName;
      property BirthDate: TDateTime read FBirthDate write FBirthDate;
   end;


Suppose that this class represent data of the Person table in a sql
database. Suppose that there is records where the column "BirthDate" is
null. How do i represent a null "BirthDate" in my object?

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160218/8a334dfd/attachment.html>


More information about the fpc-pascal mailing list