BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TDBCheckBox in TFrame loses Datasource

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
Mark L. Tiede
Guest





PostPosted: Mon Oct 20, 2003 6:21 pm    Post subject: TDBCheckBox in TFrame loses Datasource Reply with quote



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





PostPosted: Tue Oct 21, 2003 6:59 pm    Post subject: Re: TDBCheckBox in TFrame loses Datasource Reply with quote



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





PostPosted: Sat Nov 08, 2003 11:18 am    Post subject: Re: TDBCheckBox in TFrame loses Datasource Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.