After working with C# for the past decade or two, my C++ is getting a little rusty.
I'm writing a database class and have an issue with the following method:
CRecordset CAccessDatabaseReader::ExecuteSqlQuery(LPCTSTR pszSqlQuery)
{
CRecordset recordSet(&m_Database);
recordSet.Open(CRecordset::forwardOnly, pszSqlQuery);
return CRecordset(recordSet);
}
The compiler complains on the line with the return
statement:
Error C2280 'CRecordset::CRecordset(const CRecordset &)': attempting to reference a deleted function
Can someone help me understand exactly what is happening here?