Dear Viorel,
Thank you for your reply. My question is actually how to pass an information of CDatabase from a CDialog class to the another class which define the database as CDatabase*.
For example, I have a CDialog class which is defined as:
CDatabase db; (defined in the header)
db.Open(NULL,false,false,"ODBC;",TRUE);
....
I have another class which needs the information from the opened database. The declaration:
Header file:
Protected:
CDatabase *database_;
Database Parameter:
CDatabase *GetDatabase() const {return database_;}
When I tried to use this GetDatabase() in my CPP file to retrieve the information, I got NULL in return. Please help if you can.
cheers,