Seems a silly question, but I'm no database expert, so bear with me.
I have a CRecordset derived class which works fine, here is the header:
#pragma once
#include <afxdb.h>
class CCctAssembliesRecSet: public CRecordset
{
public:
CCctAssembliesRecSet(CDatabase* pdb = nullptr);
CString m_csCct3dSAPCode; // System.String
CString m_csDescrizione; // System.String
CString m_csSimpleMatNameDELME; // System.String
CString m_csQta; // System.String
double m_LungA; // System.Double
CString m_csTuboSAPCode; // System.String
CString m_csDXF; // System.String
CTime m_Data; // System.DateTime
CString m_csUT; // System.String
virtual CString GetDefaultSQL();
virtual void DoFieldExchange(CFieldExchange* pFX);
virtual CString GetDefaultConnect();
};
But there are circumstances in which I gather the data member values far from the database part. Then I may or may not add the recordset into the database.
My question is: Can I use CCctAssembliesRecSet simply as a data holder, a class, without reference to an actual database?
I suppose I am asking if GetDefaultConnect() will be called when I'm not doing a Edit or AddNew.
I think that is what I'm asking. Because I've noticed that after an .Update the data members are not necessarily valid any more.
Apologies for the confusion of my question, I hope someone can see through the mud.