资源描述:
《dbf文件c、c++的操作库程序》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、求:dbf文件C/C++的操作库程序。/************************************************************************ DBFOPforC++V1.00,1995.1.10 DevelopbyJohn,Liao ModifiedbyZhanghao.1998.05.18 ThisModuleincludetheC++headfiledbfop.hpp, andC++resourcefiledbfop.cpp. ThismoduleisdevelopforuseDBF(DBASEIII,DBASEII,
2、MFOXBASE,FOXPRO2.x) andIDX(MFOXBASE).butuseIDXonlyallowreadorchangethefieldthat isn'tkeyword. Supportnetwareshare.flielock,fileunlock,recordlock,recordunlock.*************************************************************************//*-------------------------------------------------------
3、---------------- TheclassDBFisinterfacetocustom,allfunctionthatgiven canbeinvokedbyusetheclassDBF. ------------------------------------------------------------------------ 1995.7.29Changefileoptionfxxxtoxxxlike_fsopenreplacewithsopen 1995.7.31Changedowithoptionwhentype='N' 1995.7.31Add
4、optionDBF::append(),DBF::clear(); 1998.5.18AddFoxpro2.xDBFprocess.-------------------------------------------------------------------------*/#include"stdafx.h"#ifdefDEBUG#definedebugmAfxMessageBox#definenewDEBUG_NEW#endifstaticINT2ccc(CHAR*,INT2,INT2);INT2ccc(CHAR*ptsr,INT2len,INT2bit){
5、CHARtemp1[30],temp11[30],i1; CHARtemp2[30],temp22[30],i2; INT2 tempi,i; CHAR*ps,*ps1; for(ps1=ptsr;(*ps1=='')&&(*ps1!='x0');ps1++); ps=strchr(ps1,'.'); if(ps==NULL){ //NOTHAVE'.' strcpy(temp1,ps1); temp2[0]='x0'; }else{ *ps='x0'; strcpy(t
6、emp1,ps1); ps++; strcpy(temp2,ps); } i1=len-(bit?(bit+1):0); if((int)strlen(temp1)>;(int)i1){ strncpy(temp11,temp1,i1); temp11[i1]='x0'; }else{ tempi=i1-strlen(temp1); for(i=0;i7、} //------------------------------------------ if(bit>;0){ if((int)strlen(temp2)>;(int)bit){ strncpy(temp22,temp2,bit); temp22[bit]='x0'; }else{ i2=strlen(temp2); tempi=bit-strlen(tem