
(Newbie needs help: Pointer problem)
This is what I want to do. I have a dialog that allows the user to enter a
code and after the user enters the code and clicks on search button, the
program will return the location of the coded item in another field. The
database has already been opened by another CRecordset derived class created
by MFC. My idea of doing it will be to create a OnSearch function in the
SearchDialog class which should handle the searching of the code through the
database. That means I must have some how a method to access the variables
in the CRecordset derived class so that I can do a comparison between the
variables given to me in the search dialog class and the variables coupled
to the fields of the database. I thought that I should use a pointer to
point to this class to access functions like IsOpen, IsBOF and other
navigational functions like MoveNext(), etc. Here are a couple of questions.
a) Am I doing it the right way?
b) How do I get a pointer that points to the CRecordset derived class? In
other words, I need to know how I can get a pointer to an existing class
much like the GetDocument() function.
c) Is there an easier or faster way of doing it?
Thank you very much for answering my questions!
P/S: I am using ODBC and snapshot