That's my fields in accessors:
public:
LONG m_ProductId;
TCHAR m_ProductName[51];
TCHAR m_Company[51];
TCHAR m_Code[51];
LONG m_Quantity;
double m_Price;
TCHAR m_Description[8000];
DBSTATUS m_dwProductIdStatus;
DBSTATUS m_dwProductNameStatus;
DBSTATUS m_dwCompanyStatus;
DBSTATUS m_dwCodeStatus;
DBSTATUS m_dwQuantityStatus;
DBSTATUS m_dwPriceStatus;
DBSTATUS m_dwDescriptionStatus;
DBLENGTH m_dwProductIdLength;
DBLENGTH m_dwProductNameLength;
DBLENGTH m_dwCompanyLength;
DBLENGTH m_dwCodeLength;
DBLENGTH m_dwQuantityLength;
DBLENGTH m_dwPriceLength;
DBLENGTH m_dwDescriptionLength;
That's my macroses that binded to fields:
BEGIN_COLUMN_MAP(CProductsStandartAccessor)
COLUMN_ENTRY_LENGTH_STATUS(1, m_ProductId, m_dwProductIdLength, m_dwProductIdStatus)
COLUMN_ENTRY_LENGTH_STATUS(2, m_ProductName, m_dwProductNameLength, m_dwProductNameStatus)
COLUMN_ENTRY_LENGTH_STATUS(3, m_Company, m_dwCompanyLength, m_dwCompanyStatus)
COLUMN_ENTRY_LENGTH_STATUS(4, m_Code, m_dwCodeLength, m_dwCodeStatus)
COLUMN_ENTRY_LENGTH_STATUS(5, m_Quantity, m_dwQuantityLength, m_dwQuantityStatus)
COLUMN_ENTRY_LENGTH_STATUS(6, m_Price, m_dwPriceLength, m_dwPriceStatus)
COLUMN_ENTRY_LENGTH_STATUS(7, m_Description, m_dwDescriptionLength, m_dwDescriptionStatus)
END_COLUMN_MAP()
That's a method GetRowsetProperties and Define command:
void GetRowsetProperties(CDBPropSet* pPropSet)
{
pPropSet->AddProperty(DBPROP_CANFETCHBACKWARDS, true, DBPROPOPTIONS_OPTIONAL);
pPropSet->AddProperty(DBPROP_CANSCROLLBACKWARDS, true, DBPROPOPTIONS_OPTIONAL);
pPropSet->AddProperty(DBPROP_IRowsetChange, true, DBPROPOPTIONS_OPTIONAL);
pPropSet->AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE);
}
DEFINE_COMMAND_EX(CProductsStandartAccessor, L" \
SELECT \
ProductId, \
ProductName, \
Company, \
Code, \
Quantity, \
Price, \
Description \
FROM dbo.Products")
I'm getting error E_NOINTERFACE when try to do Insert() or Delete().I added properties DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE and I don't know what calling this warning