资源描述:
《vb中超长ole数据库字段的操纵方法(转1)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、VB中超长OLE数据库字段的操纵方法(转1)Author:jaklinEmail:cjl-ccy@china.comDate:9/5/200111:30:40AMMethodofmanipulationofthesuperlongOLEdatabasefieldinVB一now,mostofthedatabasebyOLEtypeofdatabaseWordsegment,usingthisWord,canputaWorddocumentsandExcelspreadsheets,documentsofanykind,and,makewithOLEAu
2、tomationmethod,canbedirectlyactivatethefileoftheoriginaleditor,namelytheOLEServer・Thissample,wewillhaveasafeandreliablepreservationmethodofallkindsofimportantdocuments.Butisthatbecausethesefilesareoftenverylarge,afew10K,orevenhundredsofK,requiresthatwehaveakindoffeasiblecontrolm
3、ethod,realizethememoryofthisfield.一VBprovidesadatabaseprogrammercontrolData,useit,youcaneasilymanipulateDatalibrary,suchasbrowsingDatalibrary,addingnewrecords,editandupdateexistingrecords,deleterecords,etc・Butthesefunctionsisforcommondatabase,whenthedatabasehaslongOLEwordsegment
4、,simplyusetheData,can,tdothis・Inthiscase,youneedtosolvetwoquestions:first,howtosavetheinnercapacityoftheOLEwordsegment;Second,howtosynchronizetheDatacontrolstakingrecordsshowinOLEfieldsandotherfields・A:theneedleisasolutiontothetwoquestions.一一first,howtosavetheinnercapacityoftheO
5、LEwordsegment.-VBprovidesfileaccessmethod,usingthismethodwecaneasilytakeOLEdatabaseexistwordsegment・Hereisthefunctionofusingthemethodofthefileaccess,realizetheaccesstotheOLEdatabasefieldoperations・,thismakesusingtheGetandPut,theSeeklanguagesentence,inbinaryformopeningatemporaryt
6、hing,PutitaswordsegmentandOLEOLEcontrolsinthemiddleofthebufferdevice,whenreadingdatafromOLEwordsegmenttoOLEcontrols,theOLEfielddatatothetemporaryarticlefirst,thenthetemporaryfilewithOLEcontrolOLE_LOAD_FROM_FILEactioninsertedintotheOLEcontrolparts;WhenthewordwriteintotheOLEOLEcon
7、troldatasegment,firstwithOLEOLE_SAVE_TO_FILEactuatorcontrolparts,tobedepositedinthetemporarydocuments,temporaryfileswillbewrittenintotheOLEwordagain.Inthiscase,thelengthofthefixed-blockreadtheOLEwordsegmentandthevelocitytext・Therearenoerrorsinthenumberoftheseletters・Thenextsecti
8、onofthesampleisusedforthenumberofAccess2.0Numbe