执行了sum函数的SQL如何传给窗体的文本框呢    
事先写了如下,想传个m_zongji
CString sql_;                      
    sql_.Format("SELECT sum(order_price) from orderlist where order_out='1'");
    _bstr_t sql=sql_;

解决方案 »

  1.   

    SELECT sum(order_price) as totalprice from orderlist where order_out='1'then you fetch 'totalprice' field
      

  2.   

    如何得到值呢比如我设那个IDC_EDIT_totalprice为m_zongji,_ConnectionPtr m_DBCnt;如何将值给m_zongji
      

  3.   

    m_zongji.SetWindowText((_bstr_t)m_pRecordset->GetCollect("字段"));
      

  4.   

    m_zongji.SetWindowText((_bstr_t)m_pRecordset->GetCollect("字段"));
    UpdateData(false);
      

  5.   

    SELECT sum(order_price) as total from orderlist where order_out='1'使用这条语句,然后得到记录集,再使用m_zongji.SetWindowText(m_pRecordset->GetCollect("total").bstrval);
      

  6.   

    SELECT sum(order_price) as total from orderlist where order_out='1'使用这条语句,然后得到记录集,再使用m_zongji.SetWindowText(m_pRecordset->GetCollect("total").bstrval);
      

  7.   

    SetWindowText??我这怎么没有阿??写全拉!~~