Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/17/21 in all areas

  1. My workaround for generic classes is a non-generic base class. The challenge is always how to wrap stuff in such a way that you can get done what you need get done with the methods and properties defined in the abstract base class. I.e. Keep the T stuff out of the methods as far as possible. Rough example... type TxQuery = class abstract protected function GetSQL: TStrings; virtual; abstract; function GetDataSet: TDataSet; virtual; abstract; public constructor Create; virtual; // doesn't really need to do anything but exist procedure Execute; virtual; abstract; property SQL: TStrings read GetSQL; property DataSet: TDataSet read GetDataSet; end; TxQuery<T: TFDDataSet> = class(TxQuery) private FiQuery: T; protected // overrides property iQuery: T read FiQuery write FiQuery; public // overrides constructor Create; override; // initialize the T stuff end; TxQueryClass = class of TxQuery;
  2. Hi there! In the episode we will discuss why do we need REST API Server at all, what's that, which benefits it will bring to us. Serge Pilko will provide pros and cons of implementation of REST API Server and describe the difference between classic implementation with direct database access. How can we implement REST API Server? - Delphi, ASP.NET, PHP or JavaScript.
  3. https://delphisorcery.blogspot.com/2021/06/spring4d-20-sneak-peek-evolution-of.html
  4. Der schöne Günther

    Program using FDTable that works on my computer, but not on others... (Database)

    You seem to be using FireDAC to access a Microsoft Access file. I don't understand the language you have on screen, but entering the terms "ace dsn jet" from your error message into an internet search engine reveals that the computer you're trying to run it on does not seem to have the necessary ODBC drivers for accessing the database file. Does installing the following help? Download Microsoft Access Database Engine 2016 Redistributable from Official Microsoft Download Center PS: The Windows "Sandbox" is a great feature to test if your program runs on other machines that do not have additional software installed (requires Windows Professional, I think).
  5. Stefan Glienke

    Round up to next $5

    Then only +1 when it has decimal places 😉 function RoundUpToFive(AValue: Double): Integer; begin Result := ((Trunc(AValue) div 5) + Byte(Frac(AValue) > 0)) * 5; end;
  6. A few months ago I replaced all RTL collections (apart from TStringList) with spring4d 2.0 collections and I saw noticeably smaller binaries (exe/bpl) and faster overall application performance. Spring4D collections are just so much nicer to use, being interface based is a plus for me, and the LINQ like functionality makes it really easy to do sorting, filtering, projections etc - if only Delphi had lambdas so the predicates etc were not so damned verbose! I'm extremely thankful for the work @Stefan Glienke has put into Spring4D 👍
×