On Sat, 7 May 2005, Joost van der Sluis wrote:

> Hi all,
> 
> Can someone explain to me why TCustomConnection is implemented? And
> where was it based on?
> 
> In Delphi TCustomConnection is a child of TControl, not of TDatabase,

Of TComponent, actually.

> and is doesn't have EndTransaction and StartTransaction procedures.
> 
> 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. 

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...)

Michael.

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to