For Each loTDef In aoDBUser.TableDefs Set loProp = Nothing On Error Resume Next Set loProp = loTDef.Properties("Description") If Not loProp Is Nothing Then If loProp.Value = TEMP_TABLE Then End If End If Next DAO_CHECK(pPrp->get_Item(varName, &pRev));//crashing
CString CVReportQuieres::GetCustomProperty(CString psPropertyName) { // // OVERVIEW: // Get the value for the given Custom Property // DAOProperties *pColProp = NULL; DAOProperty *pProp = NULL; CDaoDatabase cDBase; cDBase.Open(CV_GetUserDatabasePath(_T("TEST.mdb"))); CString strDbVer; DAOProperties* pPrp = 0; DAOProperty* pRev = 0; try { if ( !cDBase.IsOpen() ) return(_T("")); DAO_CHECK(cDBase.m_pDAODatabase->get_Properties(&pPrp)); if ( pPrp != 0 ) { COleVariant varRevVal; COleVariant varName(_T("Description"), VT_BSTRT); DAO_CHECK(pPrp->get_Item(varName, &pRev));//crashing going to catch if (pRev != 0) { DAO_CHECK(pRev->get_Value(&varRevVal)); pRev->Release(); pRev = 0; } pPrp->Release(); pPrp = 0; strDbVer = V_BSTRT(&varRevVal); } } catch (...) { } cDBase.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)