本文整理汇总了C++中_RecordsetPtr::PutCollect方法的典型用法代码示例。如果您正苦于以下问题:C++ _RecordsetPtr::PutCollect方法的具体用法?C++ _RecordsetPtr::PutCollect怎么用?C++ _RecordsetPtr::PutCollect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_RecordsetPtr
的用法示例。
在下文中一共展示了_RecordsetPtr::PutCollect方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PutTbValue
/////////////////////////////////////////////////////////////////////////////////////////
//
// 在记录集中当前游标位置设置指定的字段的值
//
// IRecordset[in] 记录集智能指针
// FieldsName[in] 字段名
// Value[in] 新的值
//
// 如果有异常将调用ExceptionInfo函数
//
// 如果Value为空或全为空格字符,当指定的字段的类型为字符串型时,字段的值为空
// 如果字段的类型为数字型,字段的值为0
//
void CFoxBase::PutTbValue(_RecordsetPtr IRecordset, _variant_t FieldsName, CString Value)
{
adoDataTypeEnum DataType;
if(IRecordset==NULL)
return;
Value.TrimLeft();
Value.TrimRight();
try
{
if(Value.IsEmpty())
{
IRecordset->GetFields()->GetItem(FieldsName)->get_Type(&DataType);
if(DataType==adBSTR || DataType==adChar || DataType==adVarChar ||
DataType==adVarWChar ||DataType==adWChar)
{
Value=_T("");
}
else
{
Value=_T("0");
}
}
IRecordset->PutCollect(FieldsName,_variant_t(Value));
IRecordset->Update();
}
catch(_com_error /*&e*/)
{
// ExceptionInfo(e);
throw;
}
}
示例2: CopyData
BOOL CFoxBase::CopyData(_RecordsetPtr &IRecordS, _RecordsetPtr &IRecordD)
{
_variant_t TempValue;
short Item;
FieldsPtr IFields;
FieldPtr IField;
if(IRecordS==NULL || IRecordD==NULL)
{
ExceptionInfo(_T("Source Recordset or destination Recordset cann't be empty"));
return FALSE;
}
if(IRecordS->adoEOF && IRecordS->BOF)
{
return TRUE;
}
if(!IRecordD->adoEOF || !IRecordD->BOF)
{
try
{
IRecordD->MoveLast();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
}
try
{
IRecordS->MoveFirst();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
try
{
while(!IRecordS->adoEOF)
{
IRecordS->get_Fields(&IFields);
IRecordD->AddNew();
for(Item=0;Item<IFields->GetCount();Item++)
{
IFields->get_Item(_variant_t(Item),&IField);
TempValue=IRecordS->GetCollect(_variant_t(IField->GetName()));
IRecordD->PutCollect(_variant_t(IField->GetName()),TempValue);
IField.Release();
}
IRecordD->Update();
IFields.Release();
IRecordS->MoveNext();
}
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
return TRUE;
}
示例3: InsertNew
//.........这里部分代码省略.........
}
for(pos=0; !IRecord->adoEOF ;pos++)
{
try
{
IRecord->MoveNext();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
}
//
// 查如一条新记录,并将刚开始所指的以后的记录向后移
//
try
{
IRecord->AddNew();
IRecord->Update();
IRecord->MoveLast();
//将新增加的记录的值记下来.
IFields = IRecord->GetFields();
nCount = IFields->GetCount(); //字段个数
for (Item = 0; Item < nCount; Item++)
{
newFieldMap[Item] = IRecord->GetCollect(_variant_t(Item));
}
IFields.Release();
//
IRecord->MovePrevious();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
if(after==1)
pos--; //使pos再减一,变成在指针的当前位置上加入一条新记录,insert blank
pos1=pos;
while(pos>0)
{
try
{
for(Item=0;Item<nCount;Item++)
{
TempValue=IRecord->GetCollect(_variant_t(Item));
FieldMap[Item]=TempValue;
}
IRecord->MoveNext();
for(Item=0;Item<nCount;Item++)
{
IRecord->PutCollect(_variant_t(Item),FieldMap[Item]);
}
IRecord->Update();
IRecord->MovePrevious();
pos--;
if(pos>0)
IRecord->MovePrevious();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
}
// 使最开始所指的记录内容为空
if(pos1==0 && after==1) {IRecord->MoveNext();}
else
{
try
{
TempValue.Clear();
for(Item=0;Item<nCount;Item++)
{
IRecord->PutCollect(_variant_t(Item),newFieldMap[Item]);
}
IRecord->Update();
}
catch(_com_error &e)
{
ExceptionInfo(e);
return FALSE;
}
}
return TRUE;
}
示例4: ImportHanger
//导入弹簧数据(变力弹簧)
void CAESARIIToPHS::ImportHanger(_RecordsetPtr rsData,long node,CString strJOBNAME_P)
{
CString strSQL;
_RecordsetPtr pRs;
double dLoadx=1.0;//力的单位转换因子
double dFOffset=0.0;//力的偏移量
_variant_t tmpvar;
CString str;
CString strSize;
CString strPHSType;
try
{
strSQL.Format(_T("SELECT * FROM [OUTPUT_HANGERS] WHERE [NODE] = %d AND [JOBNAME] = '%s'" ),
node,strJOBNAME_P);
pRs = m_pConnSourceDB->Execute(_bstr_t(strSQL),NULL,adCmdText);
if(!(pRs->BOF&&pRs->adoEOF))
{
pRs->MoveFirst();
//力的单位转换
/*
str=vtos(pRs->GetCollect(_T("LOAD_UNITS")));
str.TrimLeft();
str.TrimRight();
str.MakeLower();
dLoadx=UnitsToUeUnits(rsData,str,m_strUNITFORCE,dFOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
*/
//pgz1工作荷载已经在表:OUTPUT_RESTRAINTS中导入了
// rsData->PutCollect("pgz1",_variant_t(vtof(pRs->GetCollect("HOT_LOAD"))*dLoadx));
// rsData->PutCollect("paz0",_variant_t(vtof(pRs->GetCollect("TH_INSTALL_LOAD"))*dLoadx+dFOffset));
// rsData->PutCollect("paz1",_variant_t(vtof(pRs->GetCollect("AC_INSTALL_LOAD"))*dLoadx+dFOffset));
double dLoadVariation = 0.0;
dLoadVariation = vtof( pRs->GetCollect("LOAD_VARIATION") );
if ( dLoadVariation < 1E-6 )
{
strPHSType = _T("9999"); //恒力弹簧
}
else //变力弹簧
{
rsData->PutCollect("CoefOfVarLoad",_variant_t( dLoadVariation /100 ) );
tmpvar = pRs->GetCollect("SIZE");
strSize.Format(_T("%02d"),vtoi(tmpvar));
//并联数
int iParalNum = vtoi( pRs->GetCollect( _T("NUMREQ") ) );
CString strHangerType = vtos( pRs->GetCollect( _T("FIGNUM") ) );
//串联数
int iSeriesNum = 0;
if ( !GetHangerSeriesNum(strHangerType,iSeriesNum) ) //得到弹簧不成功
{
CString strError;
strError.Format( _T("无法通过弹簧类型%s获得弹簧的串联数,串联数默认为1"),strHangerType );
AfxMessageBox( strError );
iSeriesNum = 1;
}
//形成类似GLIF定义的支吊架类型号
strPHSType.Format( _T("%d%d%s"),iSeriesNum,iParalNum,strSize );
}
rsData->PutCollect("TYPE",_variant_t(strPHSType));
rsData->PutCollect("psaTYPE",_variant_t(strPHSType));
}
}
catch (_com_error &e)
{
CString strMsg;
strMsg.Format("%s:%d %s", __FILE__, __LINE__, (LPSTR)e.Description());
AfxMessageBox(strMsg);
}
if ( pRs->State == adStateOpen )
{
pRs->Close();
}
}
示例5: ImportDiameter
//导入管道外径、介质温度
void CAESARIIToPHS::ImportDiameter(_RecordsetPtr rsData,long node,CString strJOBNAME_A)
{
CString strSQL;
_RecordsetPtr pRs;
double dDiameterx=1.0;//直径的换算因子
double dDOffset=0.0;//直径偏移量
double dT01x=1.0;//温度的换算因子
double dTOffset=0.0;//温度偏移量
CString str;
pRs.CreateInstance(__uuidof(Recordset));
try
{
strSQL.Format(_T("select * from input_units where jobname='%s'"),strJOBNAME_A);
pRs=m_pConnSourceDB->Execute(_bstr_t(strSQL),NULL,adCmdText);
str=vtos(pRs->GetCollect(_T("LENGTH")));
str.TrimLeft();
str.TrimRight();
str.MakeUpper();
if(!(str=="MM"))
{
dDiameterx=UnitsToUeUnits(rsData,str,"MM",dDOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
}
str=vtos(pRs->GetCollect(_T("TEMP")));
str.TrimLeft();
str.TrimRight();
str.MakeUpper();
//pfg20050630
dT01x=UnitsToUeUnits(rsData,str,"C",dTOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
//chenbl 2010.05.15
//找出单元记录
//先找起点号
pRs->Close();
strSQL.Format(_T("SELECT * FROM [INPUT_BASIC_ELEMENT_DATA] WHERE [JOBNAME] = '%s' AND [FROM_NODE] = %d"),strJOBNAME_A,node);
pRs->Open(_variant_t(strSQL),(IDispatch*)m_pConnSourceDB,adOpenStatic,adLockOptimistic,adCmdText);
if ( pRs->BOF && pRs->adoEOF ) //没有找到记录
{
pRs->Close();
//找末点
strSQL.Format(_T("SELECT * FROM [INPUT_BASIC_ELEMENT_DATA] WHERE [JOBNAME] = '%s' AND [TO_NODE] = %d"),strJOBNAME_A,node);
pRs->Open(_variant_t(strSQL),(IDispatch*)m_pConnSourceDB,adOpenStatic,adLockOptimistic,adCmdText);
if ( pRs->BOF && pRs->adoEOF ) //没有找到记录
{
pRs->Close();
strSQL.Format(_T("SELECT * FROM [INPUT_BASIC_ELEMENT_DATA],[INPUT_BENDS] WHERE [INPUT_BENDS].[JOBNAME] = '%s' AND ( [INPUT_BENDS].NODE1 = %d OR [INPUT_BENDS].NODE2 = %d OR [INPUT_BENDS].NODE3 = %d ) AND [INPUT_BASIC_ELEMENT_DATA].BEND_PTR = [INPUT_BENDS].BEND_PTR"),
strJOBNAME_A,node,node,node);
pRs->Open(_variant_t(strSQL),(IDispatch*)m_pConnSourceDB,adOpenStatic,adLockOptimistic,adCmdText);
if ( pRs->BOF && pRs->adoEOF ) //没有找到记录
{
pRs->Close();
return;
}
}
}
rsData->PutCollect("DJ1",_variant_t(vtof(pRs->GetCollect("DIAMETER"))*dDiameterx+dDOffset));
rsData->PutCollect("T01",_variant_t(vtof(pRs->GetCollect("TEMP_EXP_C1"))*dT01x+dTOffset));
if(pRs->State==adStateOpen)
{
pRs->Close();
}
}
catch (_com_error &e)
{
CString strMsg;
strMsg.Format("%s:%d %s", __FILE__, __LINE__, (LPSTR)e.Description());
AfxMessageBox(strMsg);
}
}
示例6: ImportDisplacements
//导入支吊架的线位移、角位移
//rsData 结果表(ZA)记录集、strLGkname 工况名称、strJDBNAME_P 工程名称
//flag =1 热态 、flag=0为冷态
void CAESARIIToPHS::ImportDisplacements(_RecordsetPtr rsData,long node, CString strLGKname,CString strJOBNAME_P,int flag)
{
double x= 1.0;//单位换算因子
double dLOffset=0.0;//长度的偏移
double dROffset=0.0;//角度的偏移
CString strSQL,strError;
CString strUnits;
_RecordsetPtr prsDisplacements;
prsDisplacements.CreateInstance(__uuidof(Recordset));
try
{
if(flag)
{
//热态
strSQL.Format(_T("SELECT * FROM [OUTPUT_DISPLACEMENTS] WHERE [NODE] = %d AND [CASE] = '%s' AND [JOBNAME] = '%s' "),node,strLGKname,strJOBNAME_P);
prsDisplacements = m_pConnSourceDB->Execute(_bstr_t(strSQL),NULL,adCmdText);
if ( prsDisplacements->adoEOF && prsDisplacements->BOF )
{
strError.Format( _T("OUTPUT_DISPLACEMENTS表中没有点号为%d用工况号为%s的数据"),node,strLGKname );
AfxMessageBox( strError );
prsDisplacements->Close();
return;
}
//长度单位换算
strUnits=vtos(prsDisplacements->GetCollect(_T("DUNITS")));
strUnits.TrimLeft();
strUnits.TrimRight();
strUnits.MakeLower();
if (strUnits == "mm")
{
x=1.0;
}
else
{
x=UnitsToUeUnits(rsData,strUnits,"mm",dLOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
}
//热态线位移
rsData->PutCollect("xr1",_variant_t(vtof(prsDisplacements->GetCollect("dX"))*x+dLOffset));
rsData->PutCollect("yr1",_variant_t(vtof(prsDisplacements->GetCollect("dY"))*x+dLOffset));
rsData->PutCollect("zr1",_variant_t(vtof(prsDisplacements->GetCollect("dZ"))*x+dLOffset));
rsData->PutCollect("UNIT_Displacement",_T("mm"));
//角度单位换算
strUnits=vtos(prsDisplacements->GetCollect(_T("RUNITS")));
strUnits.TrimLeft();
strUnits.TrimRight();
if(strUnits=="弧度")
{
x=1.0;
}
else
{
x=UnitsToUeUnits(rsData,strUnits,"弧度",dROffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
}
//热态角位移
rsData->PutCollect("rxR1",_variant_t(vtof(prsDisplacements->GetCollect("RX"))*x+dROffset));
rsData->PutCollect("ryR1",_variant_t(vtof(prsDisplacements->GetCollect("RY"))*x+dROffset));
rsData->PutCollect("rzR1",_variant_t(vtof(prsDisplacements->GetCollect("RZ"))*x+dROffset));
}
else
{
//冷态
strSQL.Format(_T("SELECT * FROM [OUTPUT_DISPLACEMENTS] WHERE [NODE] = %d AND [CASE] = '%s' AND [JOBNAME] = '%s' "),node,strLGKname,strJOBNAME_P);
prsDisplacements = m_pConnSourceDB->Execute(_bstr_t(strSQL),NULL,adCmdText);
if ( prsDisplacements->adoEOF && prsDisplacements->BOF )
{
strError.Format( _T("OUTPUT_DISPLACEMENTS表中没有点号为%d用工况号为%s的数据"),node,strLGKname );
AfxMessageBox( strError );
prsDisplacements->Close();
return;
}
//长度单位换算
strUnits=vtos(prsDisplacements->GetCollect(_T("DUNITS")));
strUnits.TrimLeft();
strUnits.TrimRight();
strUnits.MakeLower();
if (strUnits == "mm")
{
x=1.0;
}
else
{
x=UnitsToUeUnits(rsData,strUnits,"mm",dLOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
}
//冷态线位移
rsData->PutCollect("xL1",_variant_t(vtof(prsDisplacements->GetCollect("dX"))*x+dLOffset));
rsData->PutCollect("yL1",_variant_t(vtof(prsDisplacements->GetCollect("dY"))*x+dLOffset));
rsData->PutCollect("zL1",_variant_t(vtof(prsDisplacements->GetCollect("dZ"))*x+dLOffset));
//.........这里部分代码省略.........
示例7: importUnitsForces
//导入支架、吊架中的单位,各个方向的推力(冷态、热态)
//rsData为结果数据库 m_strLGKname为冷态、m_strRGKname为热态
//m_strJOBNAME_P 工程名称
void CAESARIIToPHS::importUnitsForces(_RecordsetPtr rsData,long node,CString m_strJOBNAME_P,CString PSA_OutDataFUnit,CString PSA_OutDataMUnit,CString m_strRGKname,CString m_strLGKname)
{
CString strSQL;
CString strMessage;
_RecordsetPtr prsOutputRestraints;
int i=0;
int IsXYZ=0;//是否在x,y,z方向已经导入了数据,因为约束类型很多,对于同一方向有多
//个约束时,需要提示用户我们还没有对这一种情况进行处理 当百位为1
//表示x方向已经导入了数据,依此类推
int IsmXYZ=0;//表示力矩,含义与IsXYZ类似
double tmpVar;
double dFx=1.0;//力的转换因子
double dFOffset=0.0;//力的偏移量
double dMx=1.0;//力矩的转换因子
double dMOffset=0.0;//力矩的偏移量
CString strFUnits;//力的单位;
CString strMUnits;//力矩的单位
double dICCWorkLoad = 0.0,dICCIncLoad = 0.0; //向上轴热态、冷态荷载
strFUnits=PSA_OutDataFUnit;
strMUnits=PSA_OutDataMUnit;
CString strTmp;
prsOutputRestraints.CreateInstance(__uuidof(Recordset));
try
{
//转换后力的单位:kgf;力矩的单位:kgf.m写入ZA表中(start)
rsData->PutCollect("Unit_Force",_variant_t(m_strUNITFORCE));
rsData->PutCollect("Unit_Momental",_variant_t(m_strUNITMOMENTAL));
//转换后力的单位:kgf;力矩的单位:kgf.m写入ZA表中(end)
//导入热态的荷载、力矩(start)
strSQL.Format(_T("SELECT * FROM [OUTPUT_RESTRAINTS] WHERE [NODE] = %d AND [CASE] = '%s' and JOBNAME='%s' "),node,m_strRGKname,m_strJOBNAME_P);
prsOutputRestraints = m_pConnSourceDB->Execute(_bstr_t(strSQL),NULL,adCmdText);
if(!(prsOutputRestraints->BOF&&prsOutputRestraints->adoEOF))
{
//pfg20050622(start)
strTmp=vtos(prsOutputRestraints->GetCollect(_T("FUNITS")));
strFUnits=(strTmp!="")?strTmp:strFUnits;
//单位换算
dFx=UnitsToUeUnits(rsData,strFUnits,m_strUNITFORCE,dFOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
strTmp=vtos(prsOutputRestraints->GetCollect(_T("MUNITS")));
strMUnits=(strTmp!="")?strTmp:strMUnits;
dMx=UnitsToUeUnits(rsData,strMUnits,m_strUNITMOMENTAL,dMOffset);
if(m_IsCaesarError) return;//pfg20050629当单位转换出错、终止导入数据
//pfg20050622(end)
prsOutputRestraints->MoveFirst();
while(!prsOutputRestraints->adoEOF)
{
tmpVar=vtof(prsOutputRestraints->GetCollect("FX"));
if( (tmpVar!=0) && (IsXYZ/100==0) || i==0 )
{//当它是第一次导入或者以前在这一方向没有荷载
rsData->PutCollect("pxr1",_variant_t(tmpVar*dFx+dFOffset));
IsXYZ=(tmpVar!=0)?(IsXYZ+100):IsXYZ;
if ( m_iUPxyz == 1 ) //X轴向上
{
dICCWorkLoad = tmpVar*dFx+dFOffset;
}
}
else if((tmpVar!=0)&&(IsXYZ/100))
{
strMessage.Format("警告:节点号为%d的支吊点在X方向上有几个荷载(请阅读使用说明)!",node);
AfxMessageBox(strMessage);
}
tmpVar=vtof(prsOutputRestraints->GetCollect("FY"));
if(((tmpVar!=0)&&(((IsXYZ%100)/10)==0))||(i==0))
{//当它是第一次导入或者以前在这一方向没有荷载
rsData->PutCollect("pyr1",_variant_t(tmpVar*dFx+dFOffset));
IsXYZ=(tmpVar!=0)?(IsXYZ+10):IsXYZ;
if ( m_iUPxyz == 2 ) //Y轴向上
{
dICCWorkLoad = tmpVar*dFx+dFOffset;
}
}
else if((tmpVar!=0)&&((IsXYZ%100)/10))
{
strMessage.Format("警告:节点号为%d的支吊点在Y方向上有几个荷载(请阅读使用说明)!",node);
AfxMessageBox(strMessage);
}
tmpVar=vtof(prsOutputRestraints->GetCollect("FZ"));
if(((tmpVar!=0)&&(IsXYZ%10==0))||(i==0))
{//当它是第一次导入或者以前在这一方向没有荷载
rsData->PutCollect("pzr1",_variant_t(tmpVar*dFx+dFOffset));
IsXYZ=(tmpVar!=0)?(IsXYZ+1):IsXYZ;
if ( m_iUPxyz == 3 ) //Z轴向上
{
dICCWorkLoad = tmpVar*dFx+dFOffset;
}
}
else if((tmpVar!=0)&&(IsXYZ%10))
{
strMessage.Format("警告:节点号为%d的支吊点在Z方向上有几个荷载(请阅读使用说明)!",node);
AfxMessageBox(strMessage);
}
tmpVar=vtof(prsOutputRestraints->GetCollect("MX"));
//.........这里部分代码省略.........
示例8: ConversionTypeCaesarToPhs
//.........这里部分代码省略.........
strRadType+="xyz";
}
else if ( strType == _T("GUIDE") )
{
iType = 260; //导向
break;
}
pRs->MoveNext();
}
if( iType == 0)
{//判断多方向约束的支吊架类型(start)
//先确定约束类型十位上的数子,它由线位移确定
//pfg20050630
strLineType.TrimLeft();
strLineType.TrimRight();
if(!strLineType.IsEmpty())
{
//pfg20050630
if(strLineType.Find("x")!=-1 && strLineType.Find("y")!=-1 && strLineType.Find("z")!=-1)
{
iDECType=7;
}
else if(strLineType.Find("y")!=-1 && strLineType.Find("z")!=-1 )
{
iDECType=6;
}
else if(strLineType.Find("x")!=-1 && strLineType.Find("z")!=-1 )
{
iDECType=5;
}
else if(strLineType.Find("x")!=-1 && strLineType.Find("y")!=-1 )
{
iDECType=4;
}
else if(strLineType.Find("z")!=-1 )
{
iDECType=3;
}
else if(strLineType.Find("y")!=-1 )
{
iDECType=2;
}
else if(strLineType.Find("x")!=-1 )
{
iDECType=1;
}
}
//再确定约束类型个位上的数子,它由角位移确定
//pfg20050630
strRadType.TrimLeft();
strRadType.TrimRight();
if(!strRadType.IsEmpty())
{
//pfg20050630
if(strRadType.Find("x")!=-1 && strRadType.Find("y")!=-1 && strRadType.Find("z")!=-1)
{
iNUMType=7;
}
else if(strRadType.Find("y")!=-1 && strRadType.Find("z")!=-1 )
{
iNUMType=6;
}
else if(strRadType.Find("x")!=-1 && strRadType.Find("z")!=-1 )
{
iNUMType=5;
}
else if(strRadType.Find("x")!=-1 && strRadType.Find("y")!=-1 )
{
iNUMType=4;
}
else if(strRadType.Find("z")!=-1 )
{
iNUMType=3;
}
else if(strRadType.Find("y")!=-1 )
{
iNUMType=2;
}
else if(strRadType.Find("x")!=-1 )
{
iNUMType=1;
}
}
//转换成AutoPSA/AutoPHS约束类型iType
iType=100+10*iDECType+iNUMType;
}
if(iType!=0)
{
rsData->PutCollect("TYPE",_variant_t(iType));
rsData->PutCollect("psaTYPE",_variant_t(iType));
}
}
catch (_com_error &e)
{
CString strMsg;
strMsg.Format("%s:%d %s", __FILE__, __LINE__, (LPSTR)e.Description());
AfxMessageBox(strMsg);
}
}