C++ 向数据库写入空值

之前一直在搞数据相关滴事情…然后碰到这么个问题,要向Access数据库的数据字段写入空值… 要是字符型字段还好说一点咯,写个空字符串就好了… 这

C++ access数据库中字段信息获取

void CDataControl::GetFieldNameCn(const CString& sTableName,CADORecordset* pAdoAccess,const CString& sNameEn, CString& sNameCn) { SAFEARRAY FAR* psa = NULL; SAFEARRAYBOUND rgsabound; _variant_t var; _variant_t Array; rgsabound.lLbound = 0; rgsabound.cElements = 4; psa = SafeArrayCreate(VT_VARIANT, 1, &rgsabound); var.vt = VT_EMPTY; long ix; ix = 0; SafeArrayPutElement(psa, &ix, &var); ix= 1; SafeArrayPutElement(psa, &ix, &var); ix = 2; var.vt = VT_BSTR; var.bstrVal =sTableName.AllocSysString(); //表名 sTableName SafeArrayPutElement(psa, &ix, &var); var.vt = VT_BSTR; ix = 3;