How to add CRecordset derived class in VC++ 2008
-
Hello all, I recently moved from VS6.0 to VS2008. I am trying to find a way to update an existing CRecordset derived class, from the DB table new structure (I'm using VS2008). Since I couldn't find how to do this, I also tried adding a new CRecordset derived class, using the MFC class wizard. Surprisingly, I couldn't find the CRecordset class in the class list to pick it from. I've tried to find a solution for this over the web, but couldn't find any useful suggestion. Please help. Thanks in advance. Eyal.
-
Hello all, I recently moved from VS6.0 to VS2008. I am trying to find a way to update an existing CRecordset derived class, from the DB table new structure (I'm using VS2008). Since I couldn't find how to do this, I also tried adding a new CRecordset derived class, using the MFC class wizard. Surprisingly, I couldn't find the CRecordset class in the class list to pick it from. I've tried to find a solution for this over the web, but couldn't find any useful suggestion. Please help. Thanks in advance. Eyal.
For adding a CRecordset derived in VS2008 you should do as follows. 1. In the Solution Explorer or Class View, right mouse click on the root node and choose Add --> Class. 2. From the Add Class dialog choose "MFC ODBC Consumer" and press Add. 3. Press the "Data Source" button to choose a data source and the required table (just follow the wizard). 4. Press "Finish". 5. Two files will be created CPP and H files. Enjoy, Dudi.