版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
实用文案VisualBasiclanguageandarithmeticTheUnitedStateslaunchedtheMicrosoftVisualBasic(maybereferredtoVB),isthelatestversionofthecurrentVB2008Beta2(VB9)Chineseversion.Visualmeaningthevisual,visible,referringtothedevelopmentofoperating systems likewindows graphical userinterface (Graphic UserInterface,GUI)method,itdoesnotneedtopreparealargenumbercodetodescribetheappearanceoftheinterfaceelementsandlocation,aslongasthepre-Theestablishmentofgooddraganddropobjectsonthescreencorrespondingtothelocation.Basicisactuallyanabbreviationofthephrase;thisphraseisBeginnersall-purposesymbolicinstructioncode,theChinesemeaning"totheinitialdirectiveGMsymbolcodelanguage."VisualBasiclearning,ProfessionalEditionandEnterpriseEditionversionstomeetthedifferentneedsofthedevelopment.StudyandapplytotheordinaryversionofthemajorityoflearnersandtheuseofVisualBasicdevelopmentofthegeneralstaffofWindowsapplications,but;professionalversionforcomputerprofessionaldevelopmentofstaff,includingthestudyoffunctionalversionofthefullcontentcontrolandInternetdevelopmenttoolssuchasadvancedfeatures,Enterprisecontainnotonlyalltheprofessionalversionofthecontent,thereareautomatedtoolssuchasComponentManager,professionalprogrammerstomakethedevelopmentofapowerfulgroupessenceofdistributedapplications.VisualBasicSection1thesummaryofVisualBasicMicrosoftVisualBasic,(abbreviateVB)astoolthemostofapplicationprogramoneofunderWindowsoperatingplatform.Nomatterbeginnerorprofessionaldeveloper,VBhasallofferedawholesetoftoolstothem,Developmentapplicationprogramthatitcanberelaxedandconvenient.SoVBasmostcomputerfirst-selectedtheABCofprogramminglanguageofbeginner.Visual"meanmethodtoadoptvisualuserofdevelopmentfigureinterface(GUI),needandwritealargenumberofcodegoanddescribe标准实用文案interfaceappearanceandpositionofelementseldom,Towandshowcontrollingpartthatneedcorrespondingpositiontogetscreencanhelpfiguredesigninterface,useroffigure,;"Basic"meansBASIClanguage,becauseVBisdevelopedonthebasisofalreadyexistingBAISClanguage.VBisakindofprogramminglanguageincommonuseofMicrosoft,It,includingVBAofthenumerousWindowsapplicationsoftwareuseVBlanguageinMicrosoftExcel,MicrosoftAccessed.,Foruserstocarryonthesecondarydevelopment;MakewebpageusemoreVBScriptscriptlanguagesubcollectionofVBtooatpresent.UtilizedataofVBvisitcharacteristicusercanestablishthedatabasetomostdatabaseformsincludingMicrosoftSQLServerandotherenterprisesdatabaseWiththeapplicationprogramoffront,andadjustableserviceendpart.UtilizeActiveX(TM)technology,VBcanusewordprocessor,electronicdatalistheWindowsfunctionthatapplicationprogramoffersextremely,ExcelofMicrosoft,,WordofMicrosoft,,EvencanusebyVBspecialtyeditionorenterpriseapplicationprogramandtargetthateditionestablishdirectly.Theprocedurethatusersestablishedfinallyisareal.EXEfile,canissuefreely.VBofferstudyedition,thespecialtyeditionandenterpriseedition,usetosatisfiedwithdifferentdevelopmentdemands.StudyeditionmakeprogrammingpersonneldevelopWindowsandWindowsapplicationprogramofNTveryeasily.Thespecialtyeditionhasofferedthedevelopinginstrumentwithcompletefunctiontoprogrammingpersonnelofthespecialty,Includestudyingallfunctionsofeditioninthespecialtyedition.Enterpriseeditionallowtheprofessionalpersonneltoestablishstrongdistributedapplicationprogramintheformofgroup.Itincludesallcharacteristicsofthespecialtyedition.Socanchoosedifferenteditionsaccordingtodifferentneeds.Section2integrateddevelopmentenvironmentsIntegratedenvironmentofVBcallIDE,madeupofalotofparts,includetitleboard,menufence,toolfence,controllingpartcase,Andwindowbodywindow,engineeringmanagementdevicewindow,attributewindow,codewindowandwindowbodyoverallarrangement标准实用文案windowbodyoverallarrangement,etc.ofdesigningetc..Havecoveredallfunctions,suchasdesignwhichdevelopstheapplicationprogram,editting,compilinganddebugging,etc..InVB,theapplicationprogramcallstheprojecttoo.WhenstartVBandopenanewprojectforthefirsttime,canseeandpursueintegrateddevelopmentenvironmentinterfacethatshow.VisualBasicIntegrateddevelopmentenvironmentVBcomeandorganizedevelopmentofapplicationprogramthroughproject,useprojectcomeandmanageandformfilesofapplicationprogram.Oneprojectusestheenvironmenttomakeupbyseveralwindowbodies,standardmodulegenerally.Thesystemmanagesprojectthroughtheprojectmenu,forinstanceaddthewindowbody,quote.Systemallowturnonandmanagealotofprojectsbesides.Section3VisualBasiclanguagebriefintroductionsBasicuseanddotheelementaryhigh-levellanguagethatusedoftenmost.ItsfullnameisBeginner'sAll-purposeSymbolicInstructionCode,abbreviateasBASIC.Asitsnamesuggests,Basiconespeciallyforlanguagethatbeginnerdesign,becauseiteasytolearneasytoknow,Sothebodyispopular.EarlyBasiclanguagetobelongtoandsolvetranslatingtype,socancarryoutlinebyline,Soitcanseetheresultcarriedoutatonce,thisisaveryconvenientdesignforbeginner.Butithaveconceptofstructureeither,onethatisinproceduremaintainandmanagementhaveasmuchasotherlanguageproblems.Butback-endBasiccorrectshortcomingoftheabove(suchasQuickBasic),makeitmayusedforanddevelopthelarge-scalerproceduretoo.Thelanguageisthebasiccomposition,whichformsVBprocedure.VBhasstipulatedtheformofsentencesandfunction.Grammar:Thesentencedefinesincantations[Sentencebody]Sentencedefineagreewithandusedinfixedfunctionofsentence,sentencebodyappointconcretecontentorwantconcreteoperationthatcarryoutofsentence.AllsetofsentenceVBlanguage,carryonwithVBsentenceorganicassociationfinishacertainspecificfunctiontheprocedure.Interface+procedurecansolveacertainapplication标准实用文案problem.VBapplicationprogramcodewindowwritein"codeeditingmachine"generally."editingmachineofcode"islikethewordprocessingsoftwareofapieceofheightspecialization,therearemanyeasiesfunctionofwritingVBcode,Pursuetoshow[ExampleEx-Hello]In"codeeditingmachine"codethatwindowwritten.“Editingmachineofcode”windowSection4developtheapplicationprogramwithVisualBasicUseVBprogramming,designappearanceofapplicationprogramfirstgenerally,writeeverytargetprocedurecodeorothertreatmentprocedureofincidentrespectively,Workofprogrammingshouldbelightmore.Theprocedureofestablishingtheapplicationprogramisasfollows:EstablishapplicationprograminterfaceTheinterfaceisthemutualbridgeofuserandprocedure,Generallyformedofwindowbodyandvisionframeofthebutton,menu,textframeset.withstandardWINDOWSinterfaceofapplicationprogramthatVBestablish.Requireaccordingtofunctionofprocedureanduserandneedofinformationinterchangeofprocedure,Cometoconfirmthatneedthosetargets,plantheoverallarrangementoftheinterface.2.DesignbyeachattributesoftargetininterfaceDemandandsetupeachattributeoftargetsuchasappearance,name,,sizeoftargeted.accordingtointerfaceofplanning.Mostattributepersonwhofetchcansetupthroughtheattributewindowwhendesignalready,Toocansetuprevisingwhenoperatinginprocedurethroughprogramminginprocedurecode.Havethetargetsrespondprogrammingbyprocedurecode3.RespondprocedurecodeofprogrammingtargetInterfacedetermineappearanceofprocedureonly,designwindowaddcodesthrough"codeeditingmachine"soonaftertheinterface,Realizesomemakethetasks,suchasresponding,informationprocessing,etc.afteracceptingexternalmessage,Addcode,realizesomeresponse,informationprocessingthatmakeafteracceptingexternalinformationtask,Aseditor'swindowofcodepursuedshows标准实用文案addcodes“codeeditingmachine”window4.KeepprojectOneVBprocedureoneproject,atthetimeofdesigningaapplicationprogram,systemwillsetuponebeexpandedandcalled.Projectfileofvbp,projectfileincludeallrelevantinformationoffilethatprojectsetupthis,Keepprojectkeepassociateddocumentsofprojectthisatthesametime.Forexamplethewindowbodyproducedwhendesigninterfacesiskeptandbeingexpandedandbeingcalled.Frmsum.Inthewindowbodyoffoxfire.Atthetimeofopeningaproject(file),thisprojectrelevantfilesloadatthesametime.5.OperateanddebuggedbyprocedureOperatetheprocedurethoroughpinoperate"selectinginthemenu,whenthemistakeappears,VBsystemcanofferinformationpromptcanlookedforandgetridofthemistakethoroughpindebug"withinoperate"menustoo.6.CanproducebyexecutiveprogramFormakeprocedurecanbreakawayfromVBenvironment,ordertobecomenextlifethrough"file""producingproject1.exe"ofmenubutexecutiveprogram(eyeful),Cancarryoutthisfiledirectlyafterthis.Inproduce,+executiveprogram,andthenthroughinstallguidebaleallassociateddocuments,Canrunindependentlyafterinstallationundertheenvironmentofwindows9x/2000asasoftwareproduct.Incomputersystem'sanysoftware,isbytheeverylargeorsmalleachkindofsoftwareconstituentconstitution,deferstothespecificalgorithmtorealizerespectively,thealgorithmqualitydirectdecisionrealizesthesoftwareperformancefitandunfitquality.Designsthealgorithmwithanymethod,whatresourcesdesignsthealgorithmtoneed,requireshowmanyrunningtime,howmanystoragespace,howtodetermineanalgorithmthequality,whenrealizesasoftware,ismustgivetosolve.Incomputersystem'soperatingsystem,thelanguagecompilingsystem,thedatabasemanagementsystemaswellasinvariouscomputerapplicationsystem'ssoftware,mustuseeachoneconcretealgorithmtorealize.Therefore,thealgorithmdesignandtheanalysisarethe标准实用文案computerscienceandatechnicalcorequestion.Thealgorithmistheproblem-solvingstep,wemaydefinethealgorithmChengJieadeterminationclassquestiontherandomonespecialmethod.Inthecomputerscience,thealgorithmneedstousethecomputeralgorithmiclanguagetodescribe,thealgorithmrepresentswiththecomputersolvesakindofquestionprecisely,theeffectivemethod.Thealgorithmconstructionofdata=procedure,solvesonetoassignmaycalculateorthesolvablequestion,thedifferentpersonmaycompilethedifferentprocedure,solvestheidenticalproblem,herehastwoproblems:First,withcomputationalmethodcloserelatedalgorithmquestion;Second,programmingtechnicalquestion.Betweenthealgorithmandtheprocedurehasthecloserelationship.Thealgorithmisagrouphasthepoorrule,theyhadstipulatedsolvessomespecifictypequestionaseriesofoperations,istotheproblemsolvingplanaccurateandthecompletedescription.Formulatesanalgorithm,generallymustpassthroughstagesandsoondesign,confirmation,analysis,code,test,debugging,time.Toalgorithmstudyincludingfiveaspectcontents:①Designalgorithm.Thealgorithmdesignworkisimpossiblecompletelytheautomation,shouldstudytheunderstandingalreadybythepracticetoprovethatwastheusefulsomebasicalgorithmdesignmethod,thesebasicdesignmethodwasnotonlysuitableforthecomputerscience,moreoverwassuitablefordomainsandsoonelectricalengineering,operationsresearch;②Expressesthealgorithm.Thedescriptionalgorithm'smethodhasmanykindsofforms,forexamplethenaturallanguageandthealgorithmiclanguage,havethesuitableenvironmentandthecharacteristicrespectively;③Confirmsthealgorithm.Thealgorithmconfirmedthegoaliscausesthepeopletobelievefirmlythatthisalgorithmcanworkunmistakablycorrectly,namelythisalgorithmhasthecircularity.Thecorrectalgorithmdescribeswiththecomputeralgorithmiclanguage,constitutesthecomputerprogram,thecomputerprogrammovesonthecomputer,obtainsthealgorithmoperationresult;④Parsingalgorithm.Thealgorithmicanalysisisrequireshowmanycomputingtimeandthestoragespacetoanalgorithmmakesthequotatheanalysis.Theparsingalgorithmmayforecastthatwhatenvironment标准实用文案thisalgorithmdoessuitinmoveseffectively,tosolvestheidenticalquestiondifferentalgorithmvaliditytomakethecomparison;⑤Confirmationalgorithm.Withmachinelanguagedescriptionalgorithmwhethercancalculateeffectively,reasonable,mustcarryonthetesttotheprocedure,thetestorderworkandmakesthespaceandtimedistributionmapbythedebuggingtobecomposed.Butthealgorithmhascertaincharacteristic,itincludes:①Determinism.Algorithmeachkindofoperationmusthavethedeterminationsignificance,thiskindofoperationshouldcarryoutwhatkindofmovementshouldnottohavetheambiguity,thegoalisclear;②Effectiveness.Requeststheoperationwhichinthealgorithmwaitsforrealizingisbasic,eachkindofoperationcanatleastcompletesintheprinciplebythehumanwiththepaperandthepeninthelimitedtime;Input.Analgorithmhas0orthemanyinputs,beforethealgorithmoperationstartsgivesthealgorithmtoneedthedatathestartingvalue,theseinputsarefromthespecificobjectset;④Output.Doesforthealgorithmoperationresult,analgorithmhasormanyoutputs,theoutputhassomekindofspecificrelationalquantitywiththeinput;⑤Haspoor.Analgorithmalwaysaftercarryingouthadthepoorstepoperationhasterminated,namelythisalgorithmwasmayreach.Satisfiesafirstfourcharacteristicgroupofrulenottobeabletobecalledthealgorithm,canonlybecalledthecomputationalprocess,theoperatingsystemisacomputationalprocessexample,theoperatingsystemusesfortomanagethecomputerresources,controlsthemanufactureindustrymovement,whenhasnotmadeindustrythemovement,thecomputationalprocessdoesnotstop,butisatthewaitingstatus.Thealgorithmcomplexityisthealgorithmefficiencymeasure,whenappraisesthealgorithmperformance,thecomplexityisanimportantbasis.Thealgorithmcomplexdegreewithmovescomputerresourceshowmanywhichthisalgorithmneedsrelated,needstheresourcesaremore,indicatedthatthisalgorithmthecomplexityishigher;Needstheresourcesareless,indicatedthatthisalgorithmthecomplexityislower.Thespatialresources,whichcomputer’sresources,operatemost标准实用文案importantly,needsthetimewhichandthestoredroutineandthedataneed,thealgorithmcomplexityhasdivisiontimecomplexityandthespatialcomplexity.Thealgorithmcarriesouttheoperationonthecomputer,needsthedata which certain storage spacedepositing description algorithm theprocedure and the algorithm need, the computer completes theoperation task to require certain time. The procedure which writesaccording to the different algorithm places when on the computeroperates, needs the time and the space aredifferent, the algorithmcomplexityisneedsthetimeandthespatialonekindofmeasuretothealgorithm operation. The different computer its operating speeddifferenceisverybig,isweighinganalgorithmthecomplexitytonotethispoint.Regardingquestion,whichassignswillfully,aprofitabletargetwhichdesigns, the complexlow algorithm isasfaraspossible when designsalgorithm considered. Moreover, when the question, which assignsalreadywhenhasmanykindsofalgorithms,animportantcriterionwhichchoicecomplexitylow,iswhenselectsalgorithmshouldfollow.Therefore,thealgorithmcomplexanalysisorselectstothealgorithmdesignhastheimportantguidingsenseandtheusevalue.When discussion algorithm complexity, two questions needtoclarify:(1)Analgorithm'scomplexityexpresseswithwhatkindofquantity;(2)Howtocalculateonetoassignthealgorithmthecomplexity.Afterfindingsolvesaquestionthealgorithm,isthisalgorithmrealization,asforwhethercouldfindthemethodwhichrealized,wasdecidedinthealgorithmcircularityandthecomputationcomplexity,whetherthisquestiondidhavethesolutionalgorithm,whethertoprovidethetimeresourceswhichandthespatialresourcesthealgorithmneeded.标准实用文案VisualBasic 语言与算法1991年,美国微软公司推出了 VisualBasic(可简称VB),目前的最新版本是VB2008Beta2(VB9)中文版。Visual意即可视的、可见的,指的是开发像windows操作系统的图形用户界面(GraphicUserInterface,GUI)的方法,它不需要编写大量代码去描述界面元素的外观和位置,只要把预先建立好的对象拖放到屏幕上相应的位置即可。Basic实际上是一个短语的缩写,这个短语就是 Beginners all_purposesymbolicinstructioncode ,其中文意思为“初始者通用符号指令代码语言” 。VisualBasic有学习版、专业版和企业版三种版本,以满足不同的开发需要。学习版适用于普通学习者及大多数使用 VisualBasic开发一般Windows 应用程序的人员,但是;专业版适用于计算机专业开发人员, 包括了学习版的全部内容功能以及Internet 控件开发工具之类的高级特性;企业版除包含专业版全部的内容外,还有自动化构件管理器等工具, 使得专业编程人员能够开发功能强大的组骨子里分布式应用程序。VisualBasic第1节VisualBasic 的概述标准实用文案MicrosoftVisualBasic( 简称VB)是在Windows 操作平台下设计应用程序的最速度、最简捷的工具之一。不论是初学者还是专业开发人员, VB都为他们提供了一整套的工具,可以轻松方便的开发应用程序。因此, VB一直被作为大多数电脑初学者的首选入门编程语言。“Visual”指的是采用可视化的开发图形用户界面( GUI)的方法,一般不需要编写大量代码去描述界面元素的外观和位置,而只要把需要的控件拖放到屏幕上的相应位置即可方便图形设计图形用户界面;“Basic”指的是BASIC语言,因为VB是在原有的BAISC语言的基础上发展起来的。VB是Microsoft 的一种通用程序设计语言,它包括在 MicrosoftExcel 、MicrosoftAccess 等众多Windows 应用软件中的VBA都使用VB语言,以供用户进行二次开发;目前制作网页使用较多的 VBScript 脚本语言也是VB的子集。利用VB的数据访问特性用户可以对包括 MicrosoftSQLServer 和其他企业数据库在内的大部分数据库格式创建数据库和前端应用程序, 以及可调整的服务端部件。利用 ActiveX(TM) 技术,VB可使用Microsoft Word 字处理器、Microsoft Excel电子数据表极其他 Windows 应用程序提供的功能,甚至可直接使用由VB专业版或企业版创建的应用程序和对象。用户最终创建的程序是一个真正的 .EXE文件,可以自由发布。VB提供了学习版,专业版和企业版,用以满足不同的开发需求。学习版使编程人员很容易地开发 Windows 和WindowsNT 的应用程序。专业版为专业编程人员提供了功能完备的开发工具, 专业版中包含了学习版的所有功能。 企业版允许专业人员以小组的形式来创建强大的分布式应用程序。 它包括专业版的所有的特性。所以可以根据不同的需要来选择不同的版本。第2节集成开发环境VB的集成环境或称 IDE,由多个部分组成,包含了标题栏、菜单栏、工具栏、控件箱,以及窗体设计器窗口、工程管理器窗口、属性窗口、代码窗口和窗体布局窗体布局等。覆盖了开发应用程序的设计、编辑、编译和调试等所有功能。在VB中,应用程序也称工程。当第一次启动 VB并打开一个新工程时,可以看到如图所示的集成开发环境界面。VisualBasic 集成开发环境VB通过工程来组织应用程序的开发,使用工程来管理构成应用程序的所有文件。一个工程一般由若干个窗体、 标准模块以及应用环境组成。 系统通过工程菜单来对工程进行管理,如添加窗体、引用等。系统允许同时打开和管理多个工程。标准实用文案第3节VisualBasic 语言简介Basic是最常被用来做入门使用的高级语言。它的全名是 Beginner’sAll-purposeSumbolicInstructionCode ,简称为 BASIC。顾名思义,Basic就是一种专为初学者设计的语言,因其易学易懂,所以身受欢迎。早期的 Basic语言都是属于解译式的,因此可以一行一行地执行,所以它可以立刻看到执行的结果,对初学者来说这是很方便的设计。不过它也因此没有结构化的概念,在程序的维护及管理上比起其他语言困难许多。不过在后期的Basic则改正了以上的缺点(如QuickBasic),使得它也可以用来开发较大型的程序。语言是构成VB程序的基本成分。VB规定了语句格式和功能。语法:语句定义符[语句体]语句定义符用于规定语句的功能,语句体指定语句的具体内容或要执行的具体操作。所有语句的集合就是VB语言,用VB语句进行有机组合完成某个特定功能就是程序。界面+程序就能解决某个应用问题。VB应用程序代码一般在“代码编辑器”窗口编写。“代码编辑器”像是一个高度专门化的字处理软件,有很多便于编写 VB代码的功能,图所示为 [例Ex-Hello]在“代码编辑器”窗口编写的代码。“代码编辑器”窗口第4节用VisualBasic开发应用程序使用VB编程,一般先设计应用程序的外观,然后再分别编写各对象事件的程序代码或其他处理程序,编程的工作要轻松多。创建应用程序的步骤如下:1.创建应用程序界面界面是用户和程序交互的桥梁,用 VB创建的标准的WINDOWS 应用程序的界面一般由窗体和按钮、菜单、文本框的图象框等构成。根据程序的功能要求和用户与程序之间的信息交流的需要,来确定需要那些对象,规划界面的布局。2.设计界面上各个对象的属性根据规划的界面要求设置各个对象的属性,比如对象的外貌、名称、颜色、大小等。大多数属性取值既可以在设计时通过属性窗口来设置, 也可以在程序代码中通过编程在程序运行时设置修改。3.编程对象响应的程序代码界面仅仅决定了程序的外观,设计完界面后就要通过“代码编辑器”窗口来添加代码,实现一些在接受外界信息后作出响应、信息处理等任务,标准实用文案添加代码,实现一些在接受外界信息后作出的响应、信息处理等任务,添加代码如图的代码编辑窗口所示“代码编辑器”窗口4.保存工程一个VB程序就是一个工程,在设计一个应用程序时,系统会建立一个扩展名为.vbp 的工程文件,工程文件包含了该工程所建立的所有文件的相关信息,保存工程就同时保存了该工程的所有相关文件。比如当设计界面时产生的窗体保存在扩展名为.frm和.frx的窗体文件中。在打开一个工程(文件)时,该工程有关的所有文件同时被装载。5.行和调试程序通过“运行”菜单中的选项来运行程序,当出现错误时, VB系统可以提供信息提示也可通过“调试”和“运行”菜单来查找和排除错误。6.生成可执行程序为了使程序可以脱离VB环境,通过“文件”菜单中的“生成工程1.exe”命令来生成可执行程序(.exe文件),此后即可直接执行该文件。在生成可+执行程序后,再通过安装向导将所有相关文件打包,就可以作为一个软件产品在windows9x/2000环境下安装后独立运行VB的数据库编程方面按其难易程度可分为三类(由易到难);●使用数据库控制项和绑定控制项●使用数据库对象变量进行编程●直接调用ODBC2.0API在使用VB进行数据库编程时,通常,会首先选择三种基本方法之一来进行数据库应用程序的方案设计 ,现在就将以上三种设计方法的适应范围及其优缺点进行一个比较。使用数据库控制项和绑定控制项1.1优点它是三种方法中编码量最小的不必了解CDBC2.0API的细节允许使用标准的和第三方厂商制订的控制项简化了错误处理支持所有的动态集方法及属性1.2缺点不能存取快照对象(snapshop)对象或表格对象(都属于记录集对象)不能存取数据库集合,比如表定义(TableDefs)字段(Fieds),索引(Indexes)标准实用文案及查询定义(QueryDefs)只能存取部分ODBC2.0管理函数不能进行真正的事务处理有限的错误诊断功能1.3应用对中小规模的数据库表(通常少于一千条记录)只进行简章的浏览操作基本SQL查询所对应的结果集长度有限(通常结果集的记录数小于一百,这些记录从一个或两个长度有限的表中检索出来)应用程序的数据输入/输出项较少(通常只涉及一个或两个长度有限的表、并且表中的字段数在10个左右且不具有关系完整性限制使用数据库对象变量进行编程2.1优点可以在程序中存取 ODBC2.0的管理函数可以控制多种记录集类型 :Dynaset、Snapshop 及Table记录集合对象可以存取存储过程和查询动作可以存取数据库集合对象 ,例如TableDefs、Fields、Indexes及QueryDefs具有真正的事务处理能力 ,包括启动事务 (Begintrans) 、提交事务(CommitTrans) 及回滚事务(Rollback)2.2缺点比使用数据控制项的方法编码量较大只能进行间接的错误处理和错误恢复对每个数据库操作没有细粒度的控制对结果集和包含结果集的内丰资源的操作受到限制同直接使用ODBC2.0API函数的方法相比性能较低2.3应用应用程序需要在执行期间动态地建立表、字段及索引 .应用程序涉及同步更新几张表 (但在逻辑上保持一致性 )的复杂事务应用程序使用结果集而不是 Dynaset 的窗体(FORMS),例如Snapshots 或Tables,这里是设计要考虑的关键应用程序的表非常大,多于1000条记录应用程序具有复杂的数据输入 /输出项,它涉及许多内部相关的字段并且包括数据库参照完整性或一致性规则应用
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论