_variant_t temp;strSql="select jhdh from jjbsjb where jm='"+WellName+"'";temp=m_pConnection->Execute((LPCTSTR)strSql,&RecordsAffected,1)
              ->GetCollect"jhdh");temp读出为0

解决方案 »

  1.   

    你是不是用错了阿应该是 
    _RecordsetPtr m_pRecordset;
    _variant_t vIndex = (long)0;m_pRecordset = m_pConnection->Execute((LPCTSTR)strSql,&RecordsAffected,1)
                  ->GetCollect"jhdh");
    if (m_pRecordset->adoEOF)
    {
    sRet = "";
    }
    else
    {
    tmp = m_pRecordset->GetCollect(vIndex);
    }
      

  2.   

    _variant_t temp;strSql="select jhdh from jjbsjb where jm='"+WellName+"'";temp=m_pConnection->Execute((LPCTSTR)strSql,&RecordsAffected,1)
                  ->GetCollect("jhdh");temp读出为0
      

  3.   

    m_pConnection->Execute((LPCTSTR)strSql,&RecordsAffected,1)
                  ->GetCollect("jhdh");返回的是m_pRecordset
      

  4.   

    m_pConnection->Execute((LPCTSTR)strSql,&RecordsAffected,1)返回的是m_pRecordset
      

  5.   

    使用MS ODBC FOR ORACLE作为数据源,不要用ORACLE ODBC DRIVER