例:
main()
{
CDataConn dc;
HRESULT hr = dc.Open();
if(hr!=S_OK) return hr;
CCommand<CDynamicStringAccessor> cmd;
CString sql = "SELECT code,begin_datetime,end_datetime FROM proxy.par_new";
hr = cmd.Open(dc.m_session,sql);//m_session是CSession的對像。
if(hr!=S_OK)
return hr;
}