Visual Basic Database Programming. 3 hours credit. Prerequisite: IN108 Visual.
Basic Programming. This course provides students with the knowledge and ...
Butler County Community College Course Coordinator: Roger Dunnell Business, Technology, and Workforce Development Division Fall 2000 COURSE OUTLINE Visual Basic Database Programming Course Description IN182. Visual Basic Database Programming. 3 hours credit. Prerequisite: IN108 Visual Basic Programming. This course provides students with the knowledge and skills necessary to create front end applications for data stores. The aim of this course is to give the student the background of accessing data and building interfaces to interact with a database. A variety of databases will be used in combination with Visual Basic. This course is designed for those anticipating a career in programming, or those seeking more knowledge in database programming. Required Textbook Connell, J. (1998). Beginning Visual Basic 6 Database Programming. Birmingham, UK: Wrox Press Ltd. Lab Requirements Visual Basic 6.0 Professional Version, Access 2000 software, and SQL-server. Course Objectives At the successful completion of this course, the student should be able to: 1. Describe the power of using a database a. Define the terminology associated with databases b. Explain the advantages of using a relational database over flat files c. Identify the most popular databases d. Discuss relationships between tables e. Differentiate between a database engine, a jet and a dll. 2. Using the ActiveX Data Object to display data a. Discuss the terminology used with the ActiveX Data Object component b. Diagram how Visual Basic accesses a database using recordsets c. Access a database using the ActiveX Data Object Data Wizard d. Create a data form using the DataGrid component e. Create a data form using the Master/Detail Layout component f. Create a data form using the HflexGrid Layout component g. Create a chart using the MS Chart Layout component h. Discuss the pros and cons of using the Wizard. 3. Programming the Data Control a. Define the terminology associated with dynamic linking and binding b. Bind a data control to a database c. Differentiate between intrinsic controls and ActiveX controls d. Explain how the Data Control functions e. Create a user interface using the Bound Datalist Control. 4. Designing a user interface for the Data Control a. Define the terminology associated with designing user interfaces b. Identify the basic components of the Visual Basic IDE c. Enumerate the form event sequence d. Bind intrinsic controls to the database fields e. Control the reactions of the data control via the data control properties f. Control the reactions of the data control by writing code for the appropriate event. 5. Programming a bulletproof user interface
a. Enumerate the properties and methods of the data control and explain their purpose b. Enumerate the properties and methods of the recordset and explain their use c. Identify the errors that can happen with the MovePrevious and MoveNext events d. Create a procedure that can be accessed by the Visual Basic program to handle record navigation e. Create a subroutine that will prevent accidental record editing. 6. Validating data and controlling user input a. Code the gotfocus and setfocus events b. Control the order of and access of a control access with the tabindex and tabstop properties c. Enable and disable controls using the appropriate property d. Create a code module to find a record in the database e. Use the API viewer to insert a call to a dll f. Code the Validate event to validate user input. 7. Building a data control class module a. Discuss the principles of classes and reusability b. Build a class module that makes a universal template from the user interface code c. Tailor the methods and properties of the class to meet the project needs d. Make the class module available to all projects e. Use a class to build a new data entry form from scratch. 8. Retrieving specific data dynamically from the database a. Explain the background of SQL b. Discuss SQL syntax and keywords c. Build a SQL query-tester d. Use SQL to retrieve data from the database e. Filter the recordset f. Group the results of the query g. Retrieve data from multiple databases h. Generate dynamic SQL based on choices selected on the user interface. 9. Design, construction and analysis of a database a. Differentiated between DAO and ADO b. Build the contact database that will underlie the application c. Store data efficiently in the database using normalization d. Create the database. 10. Create universal data access using ADO a. Explain the limitations of DAO b. Discuss strengths universal data access c. Use the ADO control programmatically to access a database d. Create an ironclad application using the ADO error collection e. Define and identify the different type of cursors f. Access a cursor programmatically. 11. Creating ADO data bound ActiveX controls a. Discuss the development of ActiveX control b. Explain the principles of binding c. Create a data control d. Add code to build the control's functionality e. Build documentation about the control f. Create a distributable .ocx file. 12. Create an Active Server Page that utilizes ADO a. Install the Personal Web Server b. Set up directories for the web site c. Code a simple ASP script d. Code a simple HTML document
e. Explain the connection between HTML, ASP and VBScript f. Create the client and server side programs to manipulate a database with ADO. Topical Outline I. Introduction to database technology a. Database terminology b. Relational database vs flat files c. Popular databases d. Relationships e. Database engines, a jets and a dlls. II. ActiveX Data Object a. Introduction to the ActiveX Data Object component b. Recordsets c. ActiveX Data Object Data Wizard d. DataGrid component e. Master/Detail Layout component f. HflexGrid Layout component g. MS Chart Layout component h. Data Wizard pros and cons. III. Data Control a. Introduction to dynamic linking and binding b. Data control binding c. Intrinsic controls vs ActiveX controls d. Data Control functions e. Bound Datalist Control. IV. User interface design a. Introduction to designing user interfaces b. Visual Basic IDE c. Form event sequence d. Intrinsic control binding e. Data control properties f. Coding the data control. V. Bulletproof user interface a. Data control properties and methods b. Recordset properties and methods c. MovePrevious and MoveNext events d. Coding record navigation e. Record editing. VI. Data validation and user input a. gotfocus and setfocus events b. tabindex and tabstop properties c. Control enabling and disabling d. Find a record in the database e. API viewer f. Validate event. VII. Data control class module a. Classes and reusability b. Class modules and universal templates c. Class methods and properties d. Publicizing the class module e. Implement class modules. VIII. Dynamic data retrieval a. Introduction to SQL b. SQL syntax and keywords c. SQL query-tester d. Data retrieval using SQL
e. Recordset filtering f. Query grouping g. Multiple databases linking h. Dynamic SQL. XI. Database design, construction and analysis a. DAO vs ADO b. Database construction c. Normalization d. Database creation. X. Universal data access a. DAO limitations b. Universal data access strengths c. Programming the ADO control d. ADO error collection e. Database cursors f. Programming cursors. XI. ADO data bound ActiveX controls a. ActiveX control development b. Binding principles c. Data control creation d. Code the control's functionality e. Document the control f. Distributable .ocx files. XII. Active Server Page and ADO a. Personal Web Server b. Web site directories c. ASP script d. HTML e. HTML, ASP and VBScript connection f. Client and server side programing. Methods of Instruction The following teaching and learning activities will assist students to achieve course objectives: lectures, demonstrations, writing projects, oral presentations, group and individual practical lab exercises/projects and case studies, reading assignments, questions and answers. Methods of Evaluation Grades will be based on exams, quizzes, homework, group and individual projects, writing projects and oral presentations.