|
我的程序好像死到这个函数里面了!
bool CCE_ADOFirstDlg::AddNewStudent(REC_STUDENT stu)
{
CEOID ceOid;
CEPROPVAL *pProps;
pProps=new CEPROPVAL[4];
memset(pProps,0,LocalSize(pProps));
pProps->propid=PID_NO;
pProps->val.lpwstr=stu.szNo;
pProps++;
memset(pProps,0,LocalSize(pProps));
pProps->propid=PID_NAME;
pProps->val.lpwstr=stu.szName;
pProps++;
memset(pProps,0,LocalSize(pProps));
pProps->propid=PID_BIRTHDAY;
pProps->val.filetime=stu.ftBirthday;
pProps++;
memset(pProps,0,LocalSize(pProps));
pProps->propid=PID_STATURE;
pProps->val.iVal=stu.iStature;
pProps=pProps-3;
ceOid=CeWriteRecordProps(m_hDB,0,4,pProps);
if(ceOid==0)
{
return false;
}
return true;
} |
|