 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Emmanuel Li Guest
|
Posted: Sat Jul 17, 2004 3:52 pm Post subject: How can I know it orginal class? |
|
|
Dear Sir,
for the DataSource->DataSet
How can I know it (DataSource->DataSet) is a TIBTable or TTable or TQuery or
TIBQuery ?
Thank you
Emmanuel
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Jul 17, 2004 9:48 pm Post subject: Re: How can I know it orginal class? |
|
|
"Emmanuel Li" <emmanuel (AT) erphk (DOT) com> wrote
| Quote: | How can I know it (DataSource->DataSet) is a TIBTable
or TTable or TQuery or TIBQuery ?
|
Use dynamic_cast:
if( dynamic_cast<TIBTable*>(DataSource->DataSet) != NULL )
//...
if( dynamic_cast<TTable*>(DataSource->DataSet) != NULL )
//...
etc..
Why do you need this, though? The DB components are designed to operate in
generic ways that don't matter what the types actually are.
Gambit
|
|
| 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
|
|