您好,欢迎访问三七文档
UAHCONNECThConnect;UAHARCHIVEhArchive;//*******ConnecttoComponenteUserArchive******************************if(uaConnect(&hConnect)==FALSE){printf(uaConnecterror:%d\r\n,uaGetLastError());return;}if(hConnect==NULL){printf(HandleUAHCONNECTequalsNULL\r\n);return;}//*******ConnecttoArchiveviaName*************************************if(uaQueryArchiveByName(hConnect,TestArchiv,&hArchive)==FALSE){printf(uaQueryArchiveError:%d\r\n,uaGetLastError());uaDisconnect(hConnect);return;}//***SimplefilterfortheUserArchivefieldsfeld1andfeld2****//filterthedatasetinTestArchiv,wherefeld1containsvalue11uaArchiveSetFilter(hArchive,feld1=11);//filterthedatasetinTestArchiv,wherefeld2containsstring'test3'//removecommentsignsforcompilation//uaArchiveSetFilter(hArchive,feld2='test3');//filterthedatasetinTestArchiv,wherefeld4containsdate//'2002-04-1811:11:11'//removecommentsignsforcompilation//uaArchiveSetFilter(hArchive,feld4='2002-04-1811:11:11');//***CombinedfilterfortheUserArchivefieldsfeld1andfeld2****//filterthedatasets,wherebothfieldsmustbeequal://removecommentsignsforcompilation//uaArchiveSetFilter(hArchive,feld1=22ANDfeld2='test2');//filterthedatasets,whereoneofthesefieldshastobeequal://removecommentsignsforcompilation//uaArchiveSetFilter(hArchive,feld1=33ORfeld2='test4');//*******OpensArchiv********************************************************if(uaArchiveOpen(hArchive)==FALSE){printf(uaArchiveOpenError\r\n,uaGetLastError());uaReleaseArchive(hArchive);uaDisconnect(hConnect);return;}//******ExportofthefiltereddatasetsintoanASCII-file******************if(uaArchiveExport(hArchive,C:\\TestArchivExport.csv,0,0)==FALSE){printf(uaArchiveExportError\r\n);}//*******CloseArchive******************************************************if(uaArchiveClose(hArchive)==FALSE){printf(erroronclosingarchive\r\n,uaGetLastError());}if(uaReleaseArchive(hArchive)==FALSE){printf(errorreleasearchive\r\n,uaGetLastError());}//*******DisconnectComponentUserArchive***************************if(uaDisconnect(hConnect)==FALSE){printf(errorondisconnection\n,uaGetLastError());return;}
本文标题:span
链接地址:https://www.777doc.com/doc-5332849 .html