 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Daryl Guest
|
Posted: Sat Apr 10, 2004 9:30 pm Post subject: Re: How Can I tell which DataSource? |
|
|
Try the following techniques, I have written them off the top of my head so
check before use...
if (DataSet->Name == "dsSport") {
// Do what ever...
}
sometimes you may have to do a dynamic_cast if the method has Sender as the
passed variable. Use the following to make sure Sender can be cast to what
you are expecting.
TADODataSet d*;
if ((d = dynamic_cast<TADODataSet*> (Sender)) == NULL) {
return
}
// Then use d as you see fit.
if (d->Name == "dsTeam") {
// Manage dsTeam
}
else if (d->Name == "dsSport") {
// Manage dsSport
}
"Claude" <claude (AT) dev (DOT) scomage.com> wrote
| Quote: | I have a DataModule with seven DataSource. Two of which are: Sport and
Team
I want to write ONE Event (AfterGetRecords) that Sport, Team and the
others
use to display the record count. I don't want to write seven
AfterGetRecords.
How do I tell which DataSource was used?
|
|
|
| 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
|
|