Board index » delphi » 'Circular data links' hard to find

'Circular data links' hard to find

This is part of a message I sent to Inprise about a 'Circular data links
allowed' error message that was very hard to track down.
I hope this helps anyone doing a Deja search in the future ;-)

=============================
Please have the *compiler* not accept equal DataSource and ListSource
for a TDBLookUpCombo, or add the place of the offence to the error
message.
It just took us two days of work to track down this (our) bug because
the error 'Circular datalinks are not allowed' showed up run-time at an
(at that time) unexpected place.
You might also want to write a technote to alert people to this cause of
the 'C.d.a.n.a' error.

Details:

A project with approx. 30 autocreated forms, one form BewerkKenmerk had
the offending TDBLookupCombo referencing DsrKenmerkNaam as both
datasource and listsource.

From the main form we did a SomeForm.ShowModal and the error was
triggered in the SomeForm.FormShow when opening a table TblKenmerkNaam
(linked to DsrKenmerkNaam).

This was the first time TblKenmerkNaam was opened, and looking back now,
that probably triggered the error. Note that the offending form was only
created, not shown, and that it had no FormCreate event.

-----------------------------------------------------------------------
Jan Doggen / Masters Software
mass...@xs4all.nl
Leiden, The Netherlands
-----------------------------------------------------------------------

 

Re:'Circular data links' hard to find


Quote
>Please have the *compiler* not accept equal DataSource and ListSource
>for a TDBLookUpCombo, or add the place of the offence to the error
>message.

Yes, but this is even quiet obvious, you can get the error even if
Datasource is not Listsource: the 'circle' can be big!
I solved this by using special sources ONLY for LOOKUP purposes and others
ONLY for EDITING.
Gotta keep them seperated!

CU
WS

Other Threads