I've created an application that queries an ODBC database using a class named CConnect. I used the Visual Studio's app wizard to create all the necessary classes so it set up the standard document/view classes. Everything looks fine (I connect to the database ok, the default sql statement runs and returns the entire dataset).
The problem is this. I want to put a data field to get user-input on what to select from the database. In the CView class I created a button that reads from the field, and updates the m_strFilter variable. This should append to the default SQL string and filter out extra data from the initial database connection. When I press the query button, nothing happens. Since the m_strFilter variable is being appended in another class, how do I requery (m_pSet->Requery() ?) and then reload the screen to show the updated results?
The problem is this. I want to put a data field to get user-input on what to select from the database. In the CView class I created a button that reads from the field, and updates the m_strFilter variable. This should append to the default SQL string and filter out extra data from the initial database connection. When I press the query button, nothing happens. Since the m_strFilter variable is being appended in another class, how do I requery (m_pSet->Requery() ?) and then reload the screen to show the updated results?