[Lazarus] RE : Propose: dont try to open TDBLookup* ListSourceautomatically

Antonio Fortuny a.fortuny at sitasoftware.lu
Mon Jul 9 15:03:12 CEST 2012

Le 09/07/2012 14:02, Marcos Douglas a ├ęcrit :
> On Mon, Jul 9, 2012 at 5:27 AM, Reinier Olislagers
> <reinierolislagers at gmail.com> wrote:
>> On 9-7-2012 10:00, Ludo Brands wrote:
>>>> Currently the db lookup controls tries to open the dataset linked to
>>>> ListSource if is closed at lookup initialization.
>>> You probably guessed it but I'm voting for removing this feature. Opening of
>>> datasets and establishing database connections behind the back of the
>>> programmer is always a bad idea.
>>> The try open when loaded (streamed), even in the fixed version, has also the
>>> nasty side effect of not being deterministic. A programmer can't easily
>>> influence the loading order of components and a change in the order will
>>> change the behavior of the program.  The fix in 22337 solves the exception
>>> but not the unpredictable behavior. If the link dataset and connection are
>>> loaded before the dblookup it will open the dataset, else it won't. So your
>>> program can start up with (some) dblookups pre-loaded or not.
>>> We shouldn't support users counting on unpredictable behavior.
>> Totally agreed.
> +1
> Marcos Douglas
+2 ;-)

Me too.


> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

More information about the Lazarus mailing list