本文整理汇总了C++中_RecordsetPtr::GetadoEOF方法的典型用法代码示例。如果您正苦于以下问题:C++ _RecordsetPtr::GetadoEOF方法的具体用法?C++ _RecordsetPtr::GetadoEOF怎么用?C++ _RecordsetPtr::GetadoEOF使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_RecordsetPtr
的用法示例。
在下文中一共展示了_RecordsetPtr::GetadoEOF方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadBufferField
//读Buffer
bool CRsDupRgn::LoadBufferField(CBaseDBEntity *pGoods, const char* szFiledName, _RecordsetPtr &rs)
{
if(pGoods == NULL) return false;
try
{
if(rs->GetadoEOF())
{
ReleaseRs(rs);
return false;
}
long lSize=0;
FieldsPtr fldPtr = rs->GetFields();
FieldPtr itemPtr = fldPtr->GetItem(szFiledName);
lSize = itemPtr->ActualSize;
if(lSize > 0)
{
_variant_t varBLOB;
varBLOB = itemPtr->GetChunk(lSize);
BYTE *pBuf=NULL;
SafeArrayAccessData(varBLOB.parray,(void**)&pBuf);
SafeArrayUnaccessData(varBLOB.parray);
// 清空SKILL
CEntityProperty* ep = pGoods->GetDataEntityManager().GetEntityProperty(string(szFiledName));
if(ep)
ep->SetBufAttr(0, pBuf, lSize);
}
}
catch(_com_error e)
{
PrintErr(CStringReading::LoadString(IDS_DBS_RSDUPRGN,STR_DBS_DUPRGN_LOADRGNOBJERR), e);
return false;
}
return true;
}
示例2: LoadMail
//! 读取个人房屋信息
void CRsMail::LoadMail(CDBMail* mail, _RecordsetPtr &rs, _ConnectionPtr& cn)
{
if(!mail) return;
if(rs->GetadoEOF()) return;
if(cn == NULL)
{
AddLogText(CStringReading::LoadString(IDS_DBS_RSDUPRGN,STR_DBS_DUPRGN_CNPTRNULL));
return;
}
try
{
//!
CDataEntityManager::EntityPropertyMapItr epItr = mail->GetDataEntityManager().GetEntityPropertyMap().begin();
for(; epItr != mail->GetDataEntityManager().GetEntityPropertyMap().end(); epItr++)
{
if(rs->GetadoEOF()) break;
if(epItr->second)
{
switch(epItr->second->GetDataType())
{
case DATA_OBJECT_TIME:
{
_variant_t var = rs->GetCollect(epItr->first.c_str());
long timeBuf[6] = {0};
if( var.vt != VT_NULL )
{
SYSTEMTIME st;
VariantTimeToSystemTime(var.date, &st);
timeBuf[0] = st.wYear;
timeBuf[1] = st.wMonth;
timeBuf[2] = st.wDay;
timeBuf[3] = st.wHour;
timeBuf[4] = st.wMinute;
timeBuf[5] = st.wSecond;
epItr->second->SetBufAttr(0, (void*)&timeBuf[0], sizeof(DWORD)*6);
}
}
break;
case DATA_OBJECT_STRING:
{
string strValue = (_bstr_t)rs->GetCollect(epItr->first.c_str());
epItr->second->SetStringAttr(0, strValue.c_str());
}
break;
case DATA_OBJECT_BUFFER:
{
LoadBufferField((CBaseDBEntity*)mail, epItr->first.c_str(), rs);
}
break;
case DATA_OBJECT_GUID:
{
CGUID tGUID(_bstr_t(rs->GetCollect(epItr->first.c_str())));
epItr->second->SetGuidAttr(0, tGUID);
}
break;
case DATA_OBJECT_FLOAT:
case DATA_OBJECT_LONG:
case DATA_OBJECT_SHORT:
case DATA_OBJECT_ULONG:
case DATA_OBJECT_USHORT:
case DATA_OBJECT_BOOL:
case DATA_OBJECT_CHAR:
case DATA_OBJECT_BYTE:
case DATA_OBJECT_WORD:
case DATA_OBJECT_DWORD:
{
long value = rs->GetCollect(epItr->first.c_str());
epItr->second->SetLongAttr(0, value);
}
break;
}
}
}
// 读取房间内物品
LoadMailGoods(mail->GetExID(), mail->GetGoodsGroupPtr(), cn);
return;
}
catch (_com_error &e)
{
PrintErr(CStringReading::LoadString(IDS_DBS_RSDUPRGN,STR_DBS_DUPRGN_LOADONERGNFAIL), e);
return;
}
return;
}