可否说明白一写,或贴出你的代码来

解决方案 »

  1.   

    CDatabase * pDatabase=new CDatabase();
    pDatabase->OpenEx(_T("DSN=TouchAmis;UID=khfw;"),CDatabase::openReadOnly|CDatabase::useCursorLib|CDatabase::noOdbcDialog);
    CRecordset * pSet=new CRecordset(pDatabase);
    pSet->m_strFilter.Format("t00salesno='%s'and t03appdate>={d'%s'} and t03appdate<={d'%s'} and t03businesstype='%s'",
    m_SalesNo,m_StartDate,m_EndDate,Type);
    pSet->Open(CRecordset::forwardOnly,"select * from t03_policyperday",CRecordset::readOnly);
    if (pSet->IsEOF())
    {
    return;
    }
    ......
    pSet->Close()
    delete pSet;
    pDatabase->Close();
    delete pDatabase;我使用这种方式连接的数据库,可是查出来的数据,和数据库中的数据相比,总有一些查不出来,不我用别的工具却全能看见,真不知道为什么???
      

  2.   

    请各位高手赐教,谢谢!!!!!