Hi,
I'm trying to fix a program that interacts with a database, and while stepping through in debug mode I see that the line in red is throwing an exception.
CustomerPlatform is derived from CRecordset.
The MSDN isn't very clear on what exactly could cause CRecordset::Open() to throw other than:
Originally Posted by
MSDN
If the requested type is not supported, the framework throws an exception.
If snapshot isn't supported, then I don't know how this ever worked in the past since that's what all cases use...
Code:
else if (CustomerPlatform* tmpRecSet = dynamic_cast<CustomerPlatform *>(recSet))
{
tblName = tmpRecSet->GetDefaultSQL();
recName = "Platform ";
tmpRecSet->m_strUniqueIDParam = inRec.GetUID();;
tmpRecSet->m_strFilter = _T("UniqueID = ?");
tmpRecSet->Open(CRecordset::snapshot);
...
}
Any ideas on why it's throwing an exception?