CFieldExchange* pFX

CFieldExchange* pFX is passed to the DoFieldExchange function of an object of a class derived from CRecordSet.

where does the pFX pointer get initialized. I am unable to construct a CFieldExchange object. I cannot initialize pFX.

I'm not sure if I'm explaining this correctly.

I have searched documentation sources, but cannot find where pFX comes from
for use in DoFieldExchange(CFieldExchange* pFX)
So why is it relevant who/where pFX is created? Most likely the framework where you find CRecordSet. May be the CRecordSet does it.

I am getting compiler errors when I try to implement the DoFieldExchange function, due to pFX not being initialized.

I try to construct a CFieldExchage object with:

CFieldExchange FX;


but it does not work


I get an error that says there is no constructor for a CFieldExchange object.


Thanks for the reply. I'll dig deeper into the CRecordSet framework.
What do you want to do?
Can you show us your code ?
I have a class MyRecordSet, derived from the CRecordSet class.

One of the functions to override is called DoFieldExchange(CFieldExchange* pFX)


pFX must be initialized.


I don't have any other relevant code because I cannot create the CFieldExchange object FX. I need the object to initialize the pointer.

The MS documentation says that pFX is generated using the OCDB consumer wizard.

The MS documentation also says that this wizard is no longer
available.


I can create the pointer itself(pFX), but I cannot initialize it because I cannot
construct the CFieldExchange object FX.
Where do you want to create or initialize the object?

I would think you ar not supposed to create something based on CFieldExchange.
Topic archived. No new replies allowed.