本文整理汇总了C++中_RecordsetPtr::raw_Close方法的典型用法代码示例。如果您正苦于以下问题:C++ _RecordsetPtr::raw_Close方法的具体用法?C++ _RecordsetPtr::raw_Close怎么用?C++ _RecordsetPtr::raw_Close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_RecordsetPtr
的用法示例。
在下文中一共展示了_RecordsetPtr::raw_Close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveSlideData
void CBacilusDetectDoc::SaveSlideData()
{
CString sql;
m_pRs->raw_Close();
sql.Format(_T("select *from BacilusDetect.dbo.PatientPerInfo where SlideID = '%s'"),m_SlideBoxData.SlideInfo.strSlideID);
m_pRs->Open((_variant_t)sql,m_pCon.GetInterfacePtr(),adOpenKeyset,adLockOptimistic,adCmdText);
if(m_pRs->adoEOF)//如果之前没有SlideID信息则
{
try
{
m_pRs->raw_Close();
//病人个人信息表
m_pRs->Open("SELECT * FROM BacilusDetect.dbo.PatientPerInfo",_variant_t((IDispatch*)m_pCon),adOpenStatic,adLockOptimistic,adCmdText);
m_pRs->AddNew();//添加一条新记录
m_pRs->Fields->GetItem(_variant_t("Name"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strName;
m_pRs->Fields->GetItem(_variant_t("PatientID"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strPatientID;
m_pRs->Fields->GetItem(_variant_t("Department"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strDepartment;
m_pRs->Fields->GetItem(_variant_t("BedID"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strBedID;
m_pRs->Fields->GetItem(_variant_t("Gender"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.nGender;
m_pRs->Fields->GetItem(_variant_t("Year"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.nYear;
m_pRs->Fields->GetItem(_variant_t("Occupation"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strOccupation;
m_pRs->Fields->GetItem(_variant_t("Telephone"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strTelephone;
m_pRs->Fields->GetItem(_variant_t("Address"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strAddress;
m_pRs->Fields->GetItem(_variant_t("SlideID"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strSlideID;
m_pRs->Update();
AfxMessageBox(_T("病人个人信息表保存成功!"));
}
catch(...)
{
AfxMessageBox(_T("病人个人信息表保存失败!"));
}
try
{
m_pRs->raw_Close();
//病人玻片信息表
m_pRs->Open("SELECT * FROM BacilusDetect.dbo.PatientSlideInfo",_variant_t((IDispatch*)m_pCon),adOpenStatic,adLockOptimistic,adCmdText);
m_pRs->AddNew();//添加一条新记录
m_pRs->Fields->GetItem(_variant_t("SlideID"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strSlideID;
m_pRs->Fields->GetItem(_variant_t("Type"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strType;
_variant_t var;
var.vt=VT_DATE;
var.date=int(m_SlideBoxData.SlideInfo.dtDetectData);
m_pRs->Fields->GetItem(_variant_t("DetectData"))->Value=(_bstr_t)var;
_variant_t vart;
vart.vt=VT_DATE;
vart.date=DATE(m_SlideBoxData.SlideInfo.dtDetectTime);
m_pRs->Fields->GetItem(_variant_t("DetectTime"))->Value=(_bstr_t)vart;
m_pRs->Fields->GetItem(_variant_t("Quantity"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strQuantity;
m_pRs->Fields->GetItem(_variant_t("StayTime"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strStayTime;
m_pRs->Fields->GetItem(_variant_t("Method"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strMethod;
m_pRs->Fields->GetItem(_variant_t("SendDoctor"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strSendDoctor;
m_pRs->Fields->GetItem(_variant_t("Judge"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strJudge;
m_pRs->Fields->GetItem(_variant_t("DetectResult"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strDetectResult;
m_pRs->Fields->GetItem(_variant_t("BacilusDensity"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strBacilusDensity;
m_pRs->Fields->GetItem(_variant_t("FOVCount"))->Value=(_bstr_t)m_SlideBoxData.nFOVCount;
m_pRs->Fields->GetItem(_variant_t("bScan"))->Value=(_bstr_t)m_SlideBoxData.bScan;
m_pRs->Fields->GetItem(_variant_t("bJudge"))->Value=(_bstr_t)m_SlideBoxData.bJudge;
m_pRs->Fields->GetItem(_variant_t("TargetCount"))->Value=(_bstr_t)GetTargetCountInSlide();
m_pRs->Fields->GetItem(_variant_t("JudgedTargetCount"))->Value=(_bstr_t)GetJudgedTargetCountInSlide();
m_pRs->Update();
AfxMessageBox(_T("病人玻片信息表保存成功!"));
}
catch(...)
{
AfxMessageBox(_T("病人玻片信息表保存失败!"));
}
try
{
m_pRs->raw_Close();
//病人报告信息表
m_pRs->Open("SELECT * FROM BacilusDetect.dbo.PatientRepInfo",_variant_t((IDispatch*)m_pCon),adOpenStatic,adLockOptimistic,adCmdText);
m_pRs->AddNew();//添加一条新记录
m_pRs->Fields->GetItem(_variant_t("ReportDoctor"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strReportDoctor;
_variant_t varr;
varr.vt=VT_DATE;
varr.date=int(m_SlideBoxData.SlideInfo.dtReportData);
m_pRs->Fields->GetItem(_variant_t("ReportData"))->Value=(_bstr_t)varr;
m_pRs->Fields->GetItem(_variant_t("CompareJudge"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strCompareJudge;
m_pRs->Fields->GetItem(_variant_t("CompareDetectResult"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strCompareDetectResult;
m_pRs->Fields->GetItem(_variant_t("CompareBacilusDensity"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strCompareBacilusDensity;
m_pRs->Fields->GetItem(_variant_t("SlideID"))->Value=(_bstr_t)m_SlideBoxData.SlideInfo.strSlideID;
_variant_t var;
var.vt=VT_DATE;
var.date=int(m_SlideBoxData.SlideInfo.dtDetectData);
m_pRs->Fields->GetItem(_variant_t("DetectData"))->Value=(_bstr_t)var;
_variant_t vart;
vart.vt=VT_DATE;
vart.date=DATE(m_SlideBoxData.SlideInfo.dtDetectTime);
m_pRs->Fields->GetItem(_variant_t("DetectTime"))->Value=(_bstr_t)vart;
//.........这里部分代码省略.........