1、文献、资料中文题目:1.VB的数据库编程分析 2.数据库的发展、应用和基本原理文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院 (部): 专 业: 软件工程班 级:姓 名:学 号:指导教师:翻译日期: 2017.02.14学生公寓智能化管理系统学生与房间管理子系统外文文献及翻译 软件工程 ANALYSIS OF DATABASE PROGRAMMING IN VBVB (Visual Basic) is a visualization programming environment that Microsoft Corporation promotes based on th
2、e Basic language.It is simple and easy to study.It has formidable function so that many computer amateurs really like it.A lot of application softwares all use VB as the software development platform.When we use VB to develop the application software,how to use the database and carry on the manageme
3、nt of the database is concerned by all exploiters.VB has provided many tools and methods for database programming.What method is used to visit the database depends on users different demands,a simple analysis of the VB database programming is explained as followings. 1.DAO Technology By using Micros
4、oft companys Jet Database Engine (Jet database engine),DAO (Data Access Object) the technology mainly provides visit to ISAM (smooth index search method) type database,such as the realization of the visit to database like FoxPro,Access, Dbase. 1.1 Use Data Controls Data controls are produced by usin
5、g “Data” button in the toolbox.It has 3 basic attributes:Connect,Database Name and RecordSource.Connect attribute specifys the database type that data controls visit,the default database is the Access database.The value of the Database Name attribute is the database filename which contains the compl
6、ete path.The Record Source attribute is the recordset that we visit,also can be tables or SQL sentences.If we will visit table stud of database file teacher mdb of TEMP folder under D plate,then Data controlss Connect attribute is null,and the Database Name attribute is “D: temp teacher mdb”,the val
7、ue of the Record Source attribute is “stud”.This can accomplish the binding between Data controls and database records. Through the methods of Data controls like Add new,Update,Delete, Move last,we can visit the database as every request.When we browse the content in database,Data controlls is used
8、frequently with DBGrid,it provides data inquiry in grid way. 1.2 Use DAO Object Storehouse The model of the DAO object storehouse is mainly using hierarchical structure, Dentine is the object in the topmost story,below it are two object sets,Errors and workspace, under the workspace object,is the Da
9、tabases set.When the application procedure quotes the DAO object storehouse,it produces only a Dentine object,and produces a default automatical working space object named workspace.When not mentioned,all database operations are all work in workspace(0),which is a default work area.But we must pay a
10、ttention:The Jet engine will not starts automatically after VB has been loaded. Only when we choose References in the menu of Project can we select Microsoft DAO 3.5 Object Library to use.We create databases with the method “Create Database” in DAO,use “CreateTable” method to bulid tables,use the “O
11、pen Database ” to open the database ,use “Open recordset”method to open recordset,use Add new,Update,Delete,Move first,Edit methods to realize each kind of operations about tables. 2.RDO Technology RDO provides a connection to related ODBC data pool.When we need to visit other databases like SQL Ser
12、ver,Oracle,especially to establish the customer/server application procedure,we may use the long range data controls RDC (Remote Data Control) and long range data objects RDO (Remote Data Control) to realize the visit to the database through the ODBC driver. By using ODBC to visit some database we m
13、ust first install the corresponding drivers,like establish a data pool,through assigned data pool to visit corresponding database.To establish the ODBC data pool is open the window of “the control panel”, double-clicks the icon of ODBC executive program,single-click “Add” button to create the data p
14、ool of the opening ODBC data pool supervisor dialog box,and choose corresponding database. 2.1 Use RDC Controls Similar to the use of DATA Controls, we use Data source name attributes to assign the data source name that controls bind,and we use SQL attributes to assign the recordset, The difference
15、is that,we have to use the SQL sentences to assign the SQL attribute in RDC Controls . When we browse the database we may find it is used with DBGrid frequently. 2.2 Use RDO Object Storehouse Before we use RDO object,we should choose References in the menu of Project, click”Microsoft Remote Data Obj
16、ect 2.0”,then we can continue.The step we use RDO to visit the ODBC data pool is: (1) Set a RDO environment object. (2) Open an ODBC data pool with the method of Open connection. (3) Establish a result object with the method of Open Result set. (4) Use assigned method to operate the records of resultset. Aft
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1