MFC ODBC 資料源配置向導 生成CRecordset派生類
界面運作效果圖
資料格式轉換
//CString --> Float
CString m_temp;
float temp = (float)_tstof(m_temp.GetBuffer(0));
//CTime --> CString
CString s = tLive.m_time.Format( "%Y/%m/%d%H:%M:%S" );
//CTime --> CString
CString temp;
temp.Format(_T("%.2f"),tLive.m_temp);
//long --> CString
CString temp;
m_eResult = temp;
temp.Format(_T("%ld"),tLive.m_id);