版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、<p> Visual Basic language and arithmetic</p><p> The United States launched the Microsoft Visual Basic (may be referred to VB), is the latest version of the current VB 2008 Beta2 (VB9) Chinese versio
2、n. </p><p> Visual meaning the visual, visible, referring to the development of operating systems like windows graphical user interface (Graphic User Interface, GUI) method, it does not need to prepare a la
3、rge number code to describe the appearance of the interface elements and location, as long as the pre - The establishment of good drag and drop objects on the screen corresponding to the location. </p><p>
4、Basic is actually an abbreviation of the phrase; this phrase is Beginners all-purpose symbolic instruction code, the Chinese meaning "to the initial directive GM symbol code language." </p><p> Vi
5、sual Basic learning, Professional Edition and Enterprise Edition versions to meet the different needs of the development. Study and apply to the ordinary version of the majority of learners and the use of Visual Basic de
6、velopment of the general staff of Windows applications, but; professional version for computer professional development of staff, including the study of functional version of the full content control and Internet develop
7、ment tools such as advanced features ,Enterprise contain n</p><p> Visual Basic </p><p> Section 1 the summary of Visual Basic </p><p> Microsoft Visual Basic,( abbreviate VB )as
8、 tool the most of application program one of under Windows operating platform. No matter beginner or professional developer, VB has all offered a whole set of tools to them, Development application program that it can be
9、 relaxed and convenient. So VB as most computer first-selected the ABC of programming language of beginner. </p><p> " Visual" mean method to adopt visual user of development figure interface (GUI
10、), need and write a large number of code go and describe interface appearance and position of element seldom, Tow and show controlling part that need corresponding position to get screen can help figure design interface,
11、 user of figure,; " Basic" means BASIC language, because VB is developed on the basis of already existing BAISC language. </p><p> VB is a kind of programming language in common use of Microsoft,
12、It, including VBA of the numerous Windows application software use VB language in Microsoft Excel, Microsoft Accessed., For users to carry on the secondary development; Make web page use more VBScript script language sub
13、 collection of VB too at present. </p><p> Utilize data of VB visit characteristic user can establish the data base to most data base forms including Microsoft SQL Server and other enterprises data base Wit
14、h the application program of front, and adjustable service end part. Utilize ActiveX(TM) technology, VB can use word processor, electronic data list he Windows function that application program offers extremely, Excel of
15、 Microsoft,, Word of Microsoft,, Even can use by VB specialty edition or enterprise application program and target th</p><p> The procedure that users established finally is a real .EXE file , can issue fre
16、ely . </p><p> VB offer study edition, the specialty edition and enterprise edition, use to satisfied with different development demands. Study edition make programming personnel develop Windows and Windows
17、 application program of NT very easily. The specialty edition has offered the developing instrument with complete function to programming personnel of the specialty, Include studying all functions of edition in the speci
18、alty edition. Enterprise edition allow the professional personnel to establish strong dis</p><p> Section 2 integrated development environments </p><p> Integrated environment of VB call IDE,
19、made up of a lot of parts , include title board, menu fence, tool fence, controlling part case, And window body window, engineering management device window, attribute window, code window and window body overall arrangem
20、ent window body overall arrangement, etc. of designing etc.. Have covered all functions, such as design which develops the application program, editting, compiling and debugging, etc.. </p><p> In VB, the a
21、pplication program calls the project too. When start VB and open a new project for the first time, can see and pursue integrated development environment interface that show. </p><p> Visual Basic Integrated
22、 development environment </p><p> VB come and organize development of application program through project, use project come and manage and form files of application program. One project uses the environment
23、 to make up by several window bodies, standard module generally. The system manages project through the project menu, for instance add the window body, quote . System allow turn on and manage a lot of projects besides. &
24、lt;/p><p> Section 3 Visual Basic language brief introductions </p><p> Basic use and do the elementary high-level language that used often most. Its full name is Beginner' s All-purpose Symb
25、olic Instruction Code, abbreviate as BASIC. As its name suggests, Basic one specially for language that beginner design, because it easy to learn easy to know, So the body is popular. Early Basic language to belong to an
26、d solve translating type, so can carry out line by line , So it can see the result carried out at once , this is a very convenient design for beginner. But it ha</p><p> The language is the basic compositio
27、n, which forms VB procedure. VB has stipulated the form of sentences and function. </p><p><b> Grammar: </b></p><p> The sentence defines incantations [Sentence body] </p>&
28、lt;p> Sentence define agree with and used in fixed function of sentence, sentence body appoint concrete content or want concrete operation that carry out of sentence. All set of sentence VB language, carry on with VB
29、 sentence organic association finish a certain specific function the procedure. Interface + procedure can solve a certain application problem. </p><p> VB application program code window write in" code
30、 editing machine" generally. " editing machine of code" is like the word processing software of a piece of height specialization, there are many easies function of writing VB code, Pursue to show [Example
31、Ex-Hello ]In" code editing machine" code that window written. </p><p> “Editing machine of code” window </p><p> Section 4 develop the application program with Visual Basic </p>
32、;<p> Use VB programming, design appearance of application program first generally, write every target procedure code or other treatment procedure of incident respectively, Work of programming should be light mor
33、e. </p><p> The procedure of establishing the application program is as follows: </p><p> Establish application program interface </p><p> The interface is the mutual bridge of u
34、ser and procedure, Generally formed of window body and vision frame of the button, menu, text frameset. with standard WINDOWS interface of application program that VB establish. Require according to function of procedure
35、 and user and need of information interchange of procedure, Come to confirm that need those targets , plan the overall arrangement of the interface. </p><p> 2. Design by each attributes of target in interf
36、ace </p><p> Demand and set up each attribute of target such as appearance, name,, size of targeted. according to interface of planning. </p><p> Most attribute person who fetch can set up thr
37、ough the attribute window when design already, Too can set up revising when operating in procedure through programming in procedure code. Have the targets respond programming by procedure code </p><p> 3. R
38、espond procedure code of programming target </p><p> Interface determine appearance of procedure only, design window add codes through" code editing machine" soon after the interface, Realize some
39、 make the tasks, such as responding, information processing,etc. after accepting external message, Add code , realize some response, information processing that make after accepting external information task, As editor
40、39;s window of code pursued shows add codes </p><p> “code editing machine” window </p><p> 4. Keep project </p><p> One VB procedure one project, at the time of designing a appl
41、ication program, system will set up one be expanded and called. Project file of vbp, project file include all relevant information of file that project set up this, Keep project keep associated documents of project this
42、at the same time. For example the window body produced when design interfaces is kept and being expanded and being called. Frm sum. In the window body of foxfire. At the time of opening a project( file), this project re&
43、lt;/p><p> 5. Operate and debugged by procedure </p><p> Operate the procedure thoroughpin operate" selecting in the menu, when the mistake appears, VB system can offer information prompt ca
44、n looked for and get rid of the mistake thoroughpin debug" within operate" menus too. </p><p> 6. Can produce by executive program </p><p> For make procedure can break away from VB
45、environment, order to become next life through" file"" producing project 1.exe" of menu but executive program (eyeful), Can carry out this file directly after this. In produce, + executive program, an
46、d then through install guide bale all associated documents, Can run independently after installation under the environment of windows 9 x/2000 as a software product.</p><p> In computer system's any sof
47、tware, is by the every large or small each kind of software constituent constitution, defers to the specific algorithm to realize respectively, the algorithm quality direct decision realizes the software performance fit
48、and unfit quality. Designs the algorithm with any method, what resources designs the algorithm to need, requires how many running time, how many storage space, how to determine an algorithm the quality, when realizes a s
49、oftware, is must give to solve. </p><p> The algorithm is the problem-solving step, we may define the algorithm Cheng Jie a determination class question the random one special method. In the computer scienc
50、e, the algorithm needs to use the computer algorithmic language to describe, the algorithm represents with the computer solves a kind of question precisely, the effective method. The algorithm construction of data = proc
51、edure, solves one to assign may calculate or the solvable question, the different person may compile the different </p><p> But the algorithm has certain characteristic, it includes:① Determinism. Algorithm
52、 each kind of operation must have the determination significance, this kind of operation should carry out what kind of movement should not to have the ambiguity, the goal is clear;② Effectiveness. Requests the operation
53、which in the algorithm waits for realizing is basic, each kind of operation can at least completes in the principle by the human with the paper and the pen in the limited time;③ Input. An algorithm </p><p>
54、 Satisfies a first four characteristic group of rule not to be able to be called the algorithm, can only be called the computational process, the operating system is a computational process example, the operating system
55、uses for to manage the computer resources, controls the manufacture industry movement, when has not made industry the movement, the computational process does not stop, but is at the waiting status.</p><p>
56、 The algorithm complexity is the algorithm efficiency measure, when appraises the algorithm performance, the complexity is an important basis. The algorithm complex degree with moves computer resources how many which thi
57、s algorithm needs related, needs the resources are more, indicated that this algorithm the complexity is higher; Needs the resources are less, indicated that this algorithm the complexity is lower.</p><p>
58、The spatial resources, which computer’s resources, operate most importantly, needs the time which and the stored routine and the data need, the algorithm complexity has division time complexity and the spatial complexity
59、.</p><p> The algorithm carries out the operation on the computer, needs the data which certain storage space depositing description algorithm the procedure and the algorithm need, the computer completes th
60、e operation task to require certain time. The procedure which writes according to the different algorithm places when on the computer operates, needs the time and the space are different, the algorithm complexity is need
61、s the time and the spatial one kind of measure to the algorithm operation. The diffe</p><p> Regarding question, which assigns willfully, a profitable target which designs, the complex low algorithm is as f
62、ar as possible when designs algorithm considered. Moreover, when the question, which assigns already when has many kinds of algorithms, an important criterion which choice complexity low, is when selects algorithm should
63、 follow. Therefore, the algorithm complex analysis or selects to the algorithm design has the important guiding sense and the use value.</p><p> When discussion algorithm complexity, two questions need to c
64、larify:</p><p> (1)An algorithm's complexity expresses with what kind of quantity;</p><p> (2)How to calculate one to assign the algorithm the complexity. After finding solves a question
65、 the algorithm, is this algorithm realization, as for whether could find the method which realized, was decided in the algorithm circularity and the computation complexity, whether this question did have the solution alg
66、orithm, whether to provide the time resources which and the spatial resources the algorithm needed.</p><p> Visual Basic 語言與算法</p><p> 1991年,美國微軟公司推出了Visual Basic(可簡稱VB),目前的最新版本是VB 2008 Beta2(
67、VB9)中文版。</p><p> Visual 意即可視的、可見的,指的是開發(fā)像windows操作系統(tǒng)的圖形用戶界面(Graphic User Interface,GUI)的方法,它不需要編寫大量代碼去描述界面元素的外觀和位置,只要把預(yù)先建立好的對(duì)象拖放到屏幕上相應(yīng)的位置即可。</p><p> Basic 實(shí)際上是一個(gè)短語的縮寫,這個(gè)短語就是 Beginners all_purpo
68、se symbolic instruction code ,其中文意思為“初始者通用符號(hào)指令代碼語言”。Visual Basic有學(xué)習(xí)版、專業(yè)版和企業(yè)版三種版本,以滿足不同的開發(fā)需要。學(xué)習(xí)版適用于普通學(xué)習(xí)者及大多數(shù)使用Visual Basic開發(fā)一般Windows應(yīng)用程序的人員,但是;專業(yè)版適用于計(jì)算機(jī)專業(yè)開發(fā)人員,包括了學(xué)習(xí)版的全部內(nèi)容功能以及Internet控件開發(fā)工具之類的高級(jí)特性;企業(yè)版除包含專業(yè)版全部的內(nèi)容外,還有自動(dòng)化構(gòu)件管
69、理器等工具,使得專業(yè)編程人員能夠開發(fā)功能強(qiáng)大的組骨子里分布式應(yīng)用程序。</p><p> Visual Basic </p><p> 第1節(jié)Visual Basic的概述 </p><p> Microsoft Visual Basic(簡稱VB)是在Windows操作平臺(tái)下設(shè)計(jì)應(yīng)用程序的最速度、最簡捷的工具之一。不論是初學(xué)者還是專業(yè)開發(fā)人員,VB都為他們提
70、供了一整套的工具,可以輕松方便的開發(fā)應(yīng)用程序。因此,VB一直被作為大多數(shù)電腦初學(xué)者的首選入門編程語言。 </p><p> “Visual”指的是采用可視化的開發(fā)圖形用戶界面(GUI)的方法,一般不需要編寫大量代碼去描述界面元素的外觀和位置,而只要把需要的控件拖放到屏幕上的相應(yīng)位置即可方便圖形設(shè)計(jì)圖形用戶界面;“Basic”指的是 BASIC語言,因?yàn)閂B是在原有的BAISC語言的基礎(chǔ)上發(fā)展起來的。 </
71、p><p> VB是 Microsoft的一種通用程序設(shè)計(jì)語言,它包括在 Microsoft Excel、Microsoft Access等眾多Windows應(yīng)用軟件中的VBA都使用VB語言,以供用戶進(jìn)行二次開發(fā);目前制作網(wǎng)頁使用較多的VBScript腳本語言也是VB的子集。 </p><p> 利用VB的數(shù)據(jù)訪問特性用戶可以對(duì)包括 Microsoft SQL Server和其他企業(yè)數(shù)據(jù)庫
72、在內(nèi)的大部分?jǐn)?shù)據(jù)庫格式創(chuàng)建數(shù)據(jù)庫和前端應(yīng)用程序,以及可調(diào)整的服務(wù)端部件。利用ActiveX(TM)技術(shù),VB可使用 Microsoft Word字處理器、Microsoft Excel電子數(shù)據(jù)表極其他Windows應(yīng)用程序提供的功能,甚至可直接使用由VB專業(yè)版或企業(yè)版創(chuàng)建的應(yīng)用程序和對(duì)象。 </p><p> 用戶最終創(chuàng)建的程序是一個(gè)真正的.EXE文件,可以自由發(fā)布。 </p><p>
73、 VB提供了學(xué)習(xí)版,專業(yè)版和企業(yè)版,用以滿足不同的開發(fā)需求。學(xué)習(xí)版使編程人員很容易地開發(fā)Windows和Windows NT的應(yīng)用程序。專業(yè)版為專業(yè)編程人員提供了功能完備的開發(fā)工具,專業(yè)版中包含了學(xué)習(xí)版的所有功能。企業(yè)版允許專業(yè)人員以小組的形式來創(chuàng)建強(qiáng)大的分布式應(yīng)用程序。它包括專業(yè)版的所有的特性。所以可以根據(jù)不同的需要來選擇不同的版本。 </p><p> 第2節(jié)集成開發(fā)環(huán)境 </p><
74、p> VB的集成環(huán)境或稱IDE,由多個(gè)部分組成,包含了標(biāo)題欄、菜單欄、工具欄、控件箱,以及窗體設(shè)計(jì)器窗口、工程管理器窗口、屬性窗口、代碼窗口和窗體布局窗體布局等。覆蓋了開發(fā)應(yīng)用程序的設(shè)計(jì)、編輯、編譯和調(diào)試等所有功能。 </p><p> 在VB中,應(yīng)用程序也稱工程。當(dāng)?shù)谝淮螁?dòng)VB并打開一個(gè)新工程時(shí),可以看到如圖所示的集成開發(fā)環(huán)境界面。 </p><p> Visual Bas
75、ic 集成開發(fā)環(huán)境 </p><p> VB通過工程來組織應(yīng)用程序的開發(fā),使用工程來管理構(gòu)成應(yīng)用程序的所有文件。一個(gè)工程一般由若干個(gè)窗體、標(biāo)準(zhǔn)模塊以及應(yīng)用環(huán)境組成。系統(tǒng)通過工程菜單來對(duì)工程進(jìn)行管理,如添加窗體、引用等。系統(tǒng)允許同時(shí)打開和管理多個(gè)工程。 </p><p> 第3節(jié)Visual Basic語言簡介 </p><p> Basic是最常被用來做入門使
76、用的高級(jí)語言。它的全名是 Beginner’s All-purpose Sumbolic Instruction Code,簡稱為 BASIC。顧名思義,Basic就是一種專為初學(xué)者設(shè)計(jì)的語言,因其易學(xué)易懂,所以身受歡迎。早期的Basic語言都是屬于解譯式的,因此可以一行一行地執(zhí)行,所以它可以立刻看到執(zhí)行的結(jié)果,對(duì)初學(xué)者來說這是很方便的設(shè)計(jì)。不過它也因此沒有結(jié)構(gòu)化的概念,在程序的維護(hù)及管理上比起其他語言困難許多。不過在后期的Basic則
77、改正了以上的缺點(diǎn)(如Quick Basic),使得它也可以用來開發(fā)較大型的程序。 </p><p> 語言是構(gòu)成VB程序的基本成分。VB規(guī)定了語句格式和功能。 </p><p><b> 語法: </b></p><p> 語句定義符[語句體] </p><p> 語句定義符用于規(guī)定語句的功能,語句體指定語句的具
78、體內(nèi)容或要執(zhí)行的具體操作。所有語句的集合就是VB語言,用VB語句進(jìn)行有機(jī)組合完成某個(gè)特定功能就是程序。界面+程序就能解決某個(gè)應(yīng)用問題。 </p><p> VB應(yīng)用程序代碼一般在“代碼編輯器”窗口編寫?!按a編輯器”像是一個(gè)高度專門化的字處理軟件,有很多便于編寫VB代碼的功能,圖所示為[例Ex-Hello]在“代碼編輯器”窗口編寫的代碼。 </p><p> “代碼編輯器”窗口 <
79、;/p><p> 第4節(jié)用Visual Basic開發(fā)應(yīng)用程序 </p><p> 使用VB編程,一般先設(shè)計(jì)應(yīng)用程序的外觀,然后再分別編寫各對(duì)象事件的程序代碼或其他處理程序,編程的工作要輕松多。 </p><p> 創(chuàng)建應(yīng)用程序的步驟如下: </p><p> 1. 創(chuàng)建應(yīng)用程序界面 </p><p> 界面是用
80、戶和程序交互的橋梁,用VB創(chuàng)建的標(biāo)準(zhǔn)的WINDOWS應(yīng)用程序的界面一般由窗體和按鈕、菜單、文本框的圖象框等構(gòu)成。根據(jù)程序的功能要求和用戶與程序之間的信息交流的需要,來確定需要那些對(duì)象,規(guī)劃界面的布局。 </p><p> 2. 設(shè)計(jì)界面上各個(gè)對(duì)象的屬性 </p><p> 根據(jù)規(guī)劃的界面要求設(shè)置各個(gè)對(duì)象的屬性,比如對(duì)象的外貌、名稱、顏色、大小等。 </p><p&g
81、t; 大多數(shù)屬性取值既可以在設(shè)計(jì)時(shí)通過屬性窗口來設(shè)置,也可以在程序代碼中通過編程在程序運(yùn)行時(shí)設(shè)置修改。 </p><p> 3. 編程對(duì)象響應(yīng)的程序代碼 </p><p> 界面僅僅決定了程序的外觀,設(shè)計(jì)完界面后就要通過“代碼編輯器” </p><p> 窗口來添加代碼,實(shí)現(xiàn)一些在接受外界信息后作出響應(yīng)、信息處理等任務(wù),添加代碼,實(shí)現(xiàn)一些在接受外界信息后作出
82、的響應(yīng)、信息處理等任務(wù),添加代碼如圖的代碼編輯窗口所示 </p><p> “代碼編輯器”窗口 </p><p><b> 4. 保存工程 </b></p><p> 一個(gè)VB程序就是一個(gè)工程,在設(shè)計(jì)一個(gè)應(yīng)用程序時(shí),系統(tǒng)會(huì)建立一個(gè)擴(kuò)展名為.vbp的工程文件,工程文件包含了該工程所建立的所有文件的相關(guān)信息,保存工程就同時(shí)保存了該工程的所有相
83、關(guān)文件。比如當(dāng)設(shè)計(jì)界面時(shí)產(chǎn)生的窗體保存在擴(kuò)展名為.frm和.frx的窗體文件中。在打開一個(gè)工程(文件)時(shí),該工程有關(guān)的所有文件同時(shí)被裝載。 </p><p> 5. 行和調(diào)試程序 </p><p> 通過“運(yùn)行”菜單中的選項(xiàng)來運(yùn)行程序,當(dāng)出現(xiàn)錯(cuò)誤時(shí), VB系統(tǒng)可以提供信息提示也可通過“調(diào)試”和“運(yùn)行”菜單來查找和排除錯(cuò)誤。 </p><p> 6.生成可執(zhí)行程
84、序 </p><p> 為了使程序可以脫離VB環(huán)境,通過“文件”菜單中的“生成工程1.exe”命令來生成可執(zhí)行程序(.exe文件),此后即可直接執(zhí)行該文件。在生成可+執(zhí)行程序后,再通過安裝向?qū)⑺邢嚓P(guān)文件打包,就可以作為一個(gè)軟件產(chǎn)品在windows 9x/2000 環(huán)境下安裝后獨(dú)立運(yùn)行</p><p> VB的數(shù)據(jù)庫編程方面按其難易程度可分為三類(由易到難);</p>
85、<p> ●使用數(shù)據(jù)庫控制項(xiàng)和綁定控制項(xiàng)</p><p> ●使用數(shù)據(jù)庫對(duì)象變量進(jìn)行編程</p><p> ●直接調(diào)用ODBC2.0API</p><p> 在使用VB進(jìn)行數(shù)據(jù)庫編程時(shí),通常,會(huì)首先選擇三種基本方法之一來進(jìn)行數(shù)據(jù)庫應(yīng)用程序的方案設(shè)計(jì), 現(xiàn)在就將以上三種設(shè)計(jì)方法的適應(yīng)范圍及其優(yōu)缺點(diǎn)進(jìn)行一個(gè)比較。</p><p>
86、; 1 使用數(shù)據(jù)庫控制項(xiàng)和綁定控制項(xiàng)</p><p><b> 1.1優(yōu)點(diǎn)</b></p><p> 它是三種方法中編碼量最小的</p><p> 不必了解CDBC2.0API的細(xì)節(jié)</p><p> 允許使用標(biāo)準(zhǔn)的和第三方廠商制訂的控制項(xiàng)</p><p><b>
87、簡化了錯(cuò)誤處理</b></p><p> 支持所有的動(dòng)態(tài)集方法及屬性</p><p><b> 1.2缺點(diǎn)</b></p><p> 不能存取快照對(duì)象(snapshop)對(duì)象或表格對(duì)象(都屬于記錄集對(duì)象)</p><p> 不能存取數(shù)據(jù)庫集合,比如表定義(TableDefs)字段(Fieds),
88、索引( Indexes)及查詢定義(QueryDefs)</p><p> 只能存取部分ODBC2.0管理函數(shù)</p><p> 不能進(jìn)行真正的事務(wù)處理</p><p> 有限的錯(cuò)誤診斷功能</p><p><b> 1.3應(yīng)用</b></p><p> 對(duì)中小規(guī)模的數(shù)據(jù)庫表(通
89、常少于一千條記錄)只進(jìn)行簡章的瀏覽操作</p><p> 基本SQL查詢所對(duì)應(yīng)的結(jié)果集長度有限(通常結(jié)果集的記錄數(shù)小于一百, 這些記錄從一個(gè)或兩個(gè)長度有限的表中檢索出來)</p><p> 應(yīng)用程序的數(shù)據(jù)輸入/輸出項(xiàng)較少(通常只涉及一個(gè)或兩個(gè)長度有限的表、并且表中的字段數(shù)在10個(gè)左右且不具有關(guān)系完整性限制</p><p> 2 使用數(shù)據(jù)庫對(duì)象變量進(jìn)行編程&
90、lt;/p><p><b> 2.1 優(yōu)點(diǎn)</b></p><p> 可以在程序中存取ODBC2.0的管理函數(shù)</p><p> 可以控制多種記錄集類型:Dynaset、Snapshop及Table記錄集合對(duì)象</p><p> 可以存取存儲(chǔ)過程和查詢動(dòng)作</p><p> 可以存取數(shù)據(jù)庫集
91、合對(duì)象,例如TableDefs、Fields、Indexes及QueryDefs</p><p> 具有真正的事務(wù)處理能力 , 包括啟動(dòng)事務(wù) ( Begintrans) 、 提交事務(wù)(CommitTrans)及回滾事務(wù)(Rollback)</p><p><b> 2.2 缺點(diǎn)</b></p><p> 比使用數(shù)據(jù)控制項(xiàng)的方法編碼量較大&
92、lt;/p><p> 只能進(jìn)行間接的錯(cuò)誤處理和錯(cuò)誤恢復(fù)</p><p> 對(duì)每個(gè)數(shù)據(jù)庫操作沒有細(xì)粒度的控制</p><p> 對(duì)結(jié)果集和包含結(jié)果集的內(nèi)豐資源的操作受到限制</p><p> 同直接使用ODBC2.0API函數(shù)的方法相比性能較低</p><p><b> 2.3 應(yīng)用</b>&
93、lt;/p><p> 應(yīng)用程序需要在執(zhí)行期間動(dòng)態(tài)地建立表、字段及索引.</p><p> 應(yīng)用程序涉及同步更新幾張表(但在邏輯上保持一致性)的復(fù)雜事務(wù)</p><p> 應(yīng)用程序使用結(jié)果集而不是Dynaset的窗體(FORMS),例如Snapshots或Tables,這里是設(shè)計(jì)要考慮的關(guān)鍵</p><p> 應(yīng)用程序的表非常大,多于100
94、0條記錄</p><p> 應(yīng)用程序具有復(fù)雜的數(shù)據(jù)輸入/輸出項(xiàng),它涉及許多內(nèi)部相關(guān)的字段并且包括數(shù)據(jù)庫參照完整性或一致性規(guī)則</p><p> 應(yīng)用程序需要執(zhí)行一些額外的操作和對(duì)結(jié)果集的查詢后處理, 尤其是需要很高的數(shù)據(jù)格式化顯示</p><p> 應(yīng)用程序需要利用復(fù)雜的ODBC管理功能以選擇、配置、校驗(yàn)及建立各種數(shù)據(jù)源</p><p>
95、; 應(yīng)用程序需要在執(zhí)行期間“顯示”數(shù)據(jù)庫的基本結(jié)構(gòu)</p><p> 應(yīng)用程序需要使用復(fù)雜的多碼索引方式來檢索或更新記錄</p><p> 3 直接調(diào)用ODBC2.0API</p><p><b> 3.1 優(yōu)點(diǎn)</b></p><p> 可以直接參與結(jié)果集的開發(fā)、管理及規(guī)范化</p><p
96、> 對(duì)結(jié)果集游標(biāo)提供了更多的控制,并且提供了更多的游標(biāo)類型和執(zhí)行動(dòng)作</p><p> 能夠確定ODBC驅(qū)動(dòng)程序及SQL的一致性級(jí)別</p><p> 可以更好地控制Windows的執(zhí)行調(diào)度及資源利用</p><p> 其他方面同其他方法差不多,因此這種方法很可能具有最好的性能</p><p><b> 3.2 缺點(diǎn)
97、</b></p><p> 較其他兩種方法需要大量的代碼</p><p> 代碼復(fù)雜并且要求程序員具有編制API調(diào)用的經(jīng)驗(yàn)</p><p> 在網(wǎng)絡(luò)上Visual Basic運(yùn)行期間庫的錯(cuò)誤處理缺乏安全性,因此代碼運(yùn)行期間出現(xiàn)的錯(cuò)誤所造成的后果會(huì)非常嚴(yán)重</p><p><b> 3.3 應(yīng)用</b>
98、</p><p> 如果系統(tǒng)環(huán)境為客戶機(jī)/服務(wù)器模式下的大規(guī)模多用戶環(huán)境,那么應(yīng)用程序必須都能夠準(zhǔn)確地解決可能出現(xiàn)的系統(tǒng)錯(cuò)誤和失敗</p><p> 應(yīng)用程序強(qiáng)調(diào)資源使用,這里如何對(duì)內(nèi)存、 網(wǎng)絡(luò)服務(wù)器資源進(jìn)行直接控制是首要的考慮因素</p><p> 應(yīng)用程序使用超大規(guī)模數(shù)據(jù)庫,例如數(shù)據(jù)庫表可能包含幾萬或幾十萬條記錄</p><p>
99、 計(jì)算機(jī)系統(tǒng)中的任何軟件,都是由大大小小的各種軟件組成部分構(gòu)成,各自按照特定的算法來實(shí)現(xiàn),算法的好壞直接決定所實(shí)現(xiàn)軟件性能的優(yōu)劣。用什么方法來設(shè)計(jì)算法,所設(shè)計(jì)算法需要什么樣的資源,需要多少運(yùn)行時(shí)間、多少存儲(chǔ)空間,如何判定一個(gè)算法的好壞,在實(shí)現(xiàn)一個(gè)軟件時(shí),都是必須予以解決的。計(jì)算機(jī)系統(tǒng)中的操作系統(tǒng)、語言編譯系統(tǒng)、數(shù)據(jù)庫管理系統(tǒng)以及各種各樣的計(jì)算機(jī)應(yīng)用系統(tǒng)中的軟件,都必須用一個(gè)個(gè)具體的算法來實(shí)現(xiàn)。因此,算法設(shè)計(jì)與分析是計(jì)算機(jī)科學(xué)與技術(shù)的一個(gè)
100、核心問題。</p><p> 算法是解題的步驟,我們可以把算法定義成解一確定類問題的任意一種特殊的方法。在計(jì)算機(jī)科學(xué)中,算法要用計(jì)算機(jī)算法語言描述,算法代表用計(jì)算機(jī)解一類問題的精確、有效的方法。算法+數(shù)據(jù)結(jié)構(gòu)=程序,求解一個(gè)給定的可計(jì)算或可解的問題,不同的人可以編寫出不同的程序,來解決同一個(gè)問題,這里存在兩個(gè)問題:一是與計(jì)算方法密切相關(guān)的算法問題;二是程序設(shè)計(jì)的技術(shù)問題。算法和程序之間存在密切的關(guān)系。算法是一組
101、有窮的規(guī)則,它們規(guī)定了解決某一特定類型問題的一系列運(yùn)算,是對(duì)解題方案的準(zhǔn)確與完整的描述。制定一個(gè)算法,一般要經(jīng)過設(shè)計(jì)、確認(rèn)、分析、編碼、測試、調(diào)試、計(jì)時(shí)等階段。對(duì)算法的學(xué)習(xí)包括五個(gè)方面的內(nèi)容:① 設(shè)計(jì)算法。算法設(shè)計(jì)工作是不可能完全自動(dòng)化的,應(yīng)學(xué)習(xí)了解已經(jīng)被實(shí)踐證明是有用的一些基本的算法設(shè)計(jì)方法,這些基本的設(shè)計(jì)方法不僅適用于計(jì)算機(jī)科學(xué),而且適用于電氣工程、運(yùn)籌學(xué)等領(lǐng)域;② 表示算法。描述算法的方法有多種形式,例如自然語言和算法語言,各自有
102、適用的環(huán)境和特點(diǎn);③確認(rèn)算法。算法確認(rèn)的目的是使人們確信這一算法能夠正確無誤地工作,即該算法具有可計(jì)算性。正確的算法用計(jì)算機(jī)算法語言描述,構(gòu)成計(jì)算機(jī)程序,計(jì)算機(jī)程序在計(jì)算機(jī)上運(yùn)</p><p> 而算法具有一定的特性,它包括:① 確定性。算法的每一種運(yùn)算必須有確定的意義,該種運(yùn)算應(yīng)執(zhí)行何種動(dòng)作應(yīng)無二義性,目的明確;② 能行性。要求算法中有待實(shí)現(xiàn)的運(yùn)算都是基本的,每種運(yùn)算至少在原理上能由人用紙和筆在有限的時(shí)間內(nèi)完
103、成;③ 輸入。一個(gè)算法有0個(gè)或多個(gè)輸入,在算法運(yùn)算開始之前給出算法所需數(shù)據(jù)的初值,這些輸入取自特定的對(duì)象集合;④ 輸出。作為算法運(yùn)算的結(jié)果,一個(gè)算法產(chǎn)生一個(gè)或多個(gè)輸出,輸出是同輸入有某種特定關(guān)系的量;⑤ 有窮性。一個(gè)算法總是在執(zhí)行了有窮步的運(yùn)算后終止,即該算法是可達(dá)的。滿足前四個(gè)特性的一組規(guī)則不能稱為算法,只能稱為計(jì)算過程,操作系統(tǒng)是計(jì)算過程的一個(gè)例子,操作系統(tǒng)用來管理計(jì)算機(jī)資源,控制作業(yè)的運(yùn)行,沒有作業(yè)運(yùn)行時(shí),計(jì)算過程并不停止,而是處
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 計(jì)算機(jī)專業(yè)外文翻譯---visual basic 語言與算法
- 外文翻譯---visual basic 語言與算法
- 計(jì)算機(jī)外文資料翻譯---visual basic簡介
- 外文翻譯---visual basic 語言與算法
- vb外文翻譯--- visual basic語言和算術(shù)
- 外文翻譯---visual basic編程語言
- 外文翻譯----visual basic編程語言
- 計(jì)算機(jī)c語言專業(yè)外文翻譯
- 外文翻譯--Visual Basic編程語言概述.doc
- 外文翻譯--Visual Basic編程語言概述.doc
- 外文翻譯--Visual Basic編程語言概述.doc
- 外文翻譯--Visual Basic編程語言概述.doc
- 計(jì)算機(jī)專業(yè)外文文獻(xiàn)及翻譯--微軟visual studio
- 計(jì)算機(jī)專業(yè)外文翻譯--計(jì)算機(jī)
- 計(jì)算機(jī)專業(yè)外文翻譯----asp語言知識(shí)介紹
- 計(jì)算機(jī)專業(yè)-外文翻譯
- 計(jì)算機(jī)專業(yè)外文翻譯(文獻(xiàn)翻譯)
- 計(jì)算機(jī)相關(guān)專業(yè)外文翻譯
- 計(jì)算機(jī)專業(yè)外文翻譯 9
- 計(jì)算機(jī)專業(yè)aspnet外文翻譯
評(píng)論
0/150
提交評(píng)論