 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark L. Tiede Guest
|
Posted: Mon Oct 20, 2003 6:21 pm Post subject: TDBCheckBox in TFrame loses Datasource |
|
|
Delphi 6.
We have an application with a TFrame hierarchy. We have a dataset and
datasource on a datamodule. The TFrame descendent has a TDBCheckBox. We
added the datamodule unit to the form that contains the frame. We selected
the dbcheckbox and set its datasource. Program runs fine.
In the IDE, we close the datamodule and the form with the TFrame (closing
the datamodule first). When we re-open the form containing the frame and
checkbox, the checkbox datasource property is empty. And if we compile and
run the program, it fails because the control is not hooked to a datasource.
What gives?
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Tue Oct 21, 2003 6:59 pm Post subject: Re: TDBCheckBox in TFrame loses Datasource |
|
|
In article <3f9427a4 (AT) newsgroups (DOT) borland.com>, Mark L. Tiede wrote:
| Quote: | We have an application with a TFrame hierarchy. We have a dataset and
datasource on a datamodule. The TFrame descendent has a TDBCheckBox. We
added the datamodule unit to the form that contains the frame. We selected
the dbcheckbox and set its datasource. Program runs fine.
In the IDE, we close the datamodule and the form with the TFrame (closing
the datamodule first). When we re-open the form containing the frame and
checkbox, the checkbox datasource property is empty. And if we compile and
run the program, it fails because the control is not hooked to a datasource.
What gives?
|
That is a recurrent problem with component references between modules. If the
"source" module is not open when you save or load the module containing the
reference the streaming system cannot resolve it and removes it.
It is best to set such references at run-time, in the forms OnCreate event,
for example.
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
|
|
| Back to top |
|
 |
Erwin Krijnen Guest
|
Posted: Sat Nov 08, 2003 11:18 am Post subject: Re: TDBCheckBox in TFrame loses Datasource |
|
|
Is this problem solved in Delphi 7? We are having the same problems,
but we use Delphi 5.
Thanx,
Erwin Krijnen
"Peter Below (TeamB)" <100113.1101 (AT) compuXXserve (DOT) com> wrote
| Quote: | In article <3f9427a4 (AT) newsgroups (DOT) borland.com>, Mark L. Tiede wrote:
We have an application with a TFrame hierarchy. We have a dataset and
datasource on a datamodule. The TFrame descendent has a TDBCheckBox. We
added the datamodule unit to the form that contains the frame. We selected
the dbcheckbox and set its datasource. Program runs fine.
In the IDE, we close the datamodule and the form with the TFrame (closing
the datamodule first). When we re-open the form containing the frame and
checkbox, the checkbox datasource property is empty. And if we compile and
run the program, it fails because the control is not hooked to a datasource.
What gives?
That is a recurrent problem with component references between modules. If the
"source" module is not open when you save or load the module containing the
reference the streaming system cannot resolve it and removes it.
It is best to set such references at run-time, in the forms OnCreate event,
for example.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|