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);