[fpc-devel] TCustomConnection - why?

Joost van der Sluis joost at cnoc.nl
Sat May 7 16:09:59 CEST 2005

> > I think that the idea behind TCustomConnection is the same of
> > TDBDatabase. So I would suggest to implement all connect/disconnect
> > stuff from TCustomConnection to TDBDatabase, and remove
> > TCustomConnection.
> > 
> > Or am I missing something?
> You are. 
> First, TCustomConnection is there for Delphi compatibility, 
> so removing it would be a bad idea, it was put there to 
> allow tools as InstantObjects to compile. 

Create an alias to TDBDatabase or rename TDBDatabase to

> Secondly, TDatabase can also simply be a directory (e.g. with 
> Dbase files), so it does not need 'connect' functionality, 
> which is why TCustomConnection is a descendent and not an alias.
> TDatabase is (loosely said) something that binds various datasets 
> together. TCustomConnection is for actual client/server things.
> In this sense, e.g. TSQLConnection should be a descendent of 
> TCustomConnection instead of TDatabase. But I didn't have time 
> yet to discuss that with you.
> (too busy with the 2.0 docs, which are now finished BTW, so 
> you can start firing questions...)

There's a difference between TDatabase and TDBDatabase. Now it is:

TDatabase - TDBDatabase - TSQLConnection.

So I think that the idea behind TDBDatabase is the same as

(The TDBDatabase also has transactions and datasets assigned to it, so
that if the TDBdatabase closes, all transactions and datasets are closed
and such)

Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken

More information about the fpc-devel mailing list