Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.

Slides:



Advertisements
Similar presentations
Basics of Database Programming with VB6
Advertisements

Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Access Lesson 2 Creating a Database
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
Visual Basic Database Access BICS546. Microsoft Universal Data Access OLE DB: The OLE database protocol –Allows a program to access information in any.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab10 Interacting with Data (Database Management)
1 Pertemuan 09 Database Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Component 8, Slide 1 CP2030 Visual basic for C++ Programmers, ‘The VB Team’ Copyright © University of Wolverhampton CP2030 Visual Basic For C++ Programmers.
Chapter 8 Relational Databases ActiveX Database Controls 8 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Some Basic Database Terminology
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Microsoft Word 2000: Mail Merge Basics Peggy Serfazo Marple Molly Calvello Support Professionals Business Applications - Desktop Microsoft Corporation.
Handling of data from multiple databases. Visual Basic Database Visual Basic application acts as a front-end to the database Visual Basic application.
Copyright © 2001 by Wiley. All rights reserved. Chapter 10: Advanced Database Operations Revising Vintage Videos Setting RecordSource at run time DBGrid.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Data-mining & Data As we used Excel that has capability to analyze data to find important information, the data-mining helps us to extract information.
Navigating database with windows forms.. Tiered applications  Provide a means to develop many presentations of the same app  Makes changes to the back.
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 11 Accessing Database.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
Copyright © 2001 by Wiley. All rights reserved. Chapter 9: Introduction to Working with Databases in Visual Basic Database Concepts Relational Database.
CHAPTER EIGHT Accessing Data Processing Databases.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Lesson 17 Getting Started with Access Essentials
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 9 – Building Links,
CHAPTER EIGHT Accessing Data Processing Databases.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Microsoft Access 2013 Simplify Data Entry with Forms Chapter 3.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 2 – Viewing and.
A Skills Approach Access 2010 Getting Started with Access 2010 © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 1.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
Windows Forms Navigating database with windows forms.
Tutorial 91 Databases A database is an organized collection of related information stored in a file on a disk A database allows companies to store information.
Using Adapter Wizard ISYS 512. Data Adapter Wizard – 2 nd Level of Using ADO.Net Configure Data Adapter and generating a dataset: –From the Data tab of.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lesson 1 Introduction.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
Introduction to a Database Defining a database Database window in Access The six items in window: Tables, Queries Forms, Reports, Macros, Modules.
Ch. 101 Database Management An Introduction to Databases.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Concept 1 Database – Organized collection of related information.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
1 ADO Activex Data Objects. 2 ADO ADO allows users to access data easily from many existing databases (such as Access or Paradox) From ODBC compliant.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
Chapter 9 Working with Databases. Copyright © 2011 Pearson Addison-Wesley Introduction In this chapter you will learn: – Basic database concepts – How.
Creating SQL Database file And Displaying a Database Table in a DataGridView.
 2 Data Object Library approaches ◦ DAO (Data Access Objects)  Original access strategy (up to VB6)  Closely linked to MS Access ◦ ADO (ActiveX Data.
Visual Basic Database Access
Microsoft Access 2016 Simplify Data Entry with Forms
The Recordset Object.
Database vs. DBMS Database Database Management System
Simplify Data Entry with Forms Chapter 3
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Access: Access Basics Participation Project
Database Applications
Working With Databases
Chapter 10 Accessing Database Files
Presentation transcript:

Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San Diego

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Ch 11: Accessing Data Files  Creating DB files for use by VB  Data control and data-bound controls  Viewing a database table  Using list and combo boxes as bound controls  Adding a lookup table & navigation  Updating a database file

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Visual Basic and Database files  Database formats supported –dBASE, Excel, FoxPro, Lotus –Paradox, text files –With ODBC: SQL server, Oracle, DB2  Database terminology –File, Table, Row –Column, Record, Field –Key field

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Database Terminology  File: collection of tables  Table: consists of rows and columns  Row also known as a record  Field (column): data element of a table  Key field (primary key): unique identifier for row  Current Record: available record

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Creating DBs for use by VB  Cannot use VB Standard Edition or Learning Edition to create new database  You can run the Visual Data Manager add- in that comes with VB –Select Visual Data Manager from the Add-Ins menu –The VisData application window opens

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Using the data control  Data tool (toolbox):  Data control:  Data control on form:

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Data Control (continued)  Set three properties on the Data Control: –Connect-database type (Access) –DatabaseName-name/location of DB –RecordSource-table/query (view) name  Set ReadOnly property to True if you want to prevent updates to database  Next, you can set up data-bound controls

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Data-Bound Control Properties  After placing text boxes, option buttons, etc. on the form, you can bind each control to a column (field) of the table or query whose name is in the RecordSource property.  Set DataSource-point to Data Control  Set DataField-specify Table field

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Viewing a Database File  Design & create the form  Set the properties for the data control  Set the properties for the data-bound controls  Write the code  Run the project

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Navigating the database in code  Data control provides navigation controls  You can hide the data control and provide record movement in code  Recordset object is defined by RecordSource property of Data control  Tip: use App.Path to set DatabaseName property

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Navigating Database (continued)  Using the MoveNext, MovePrevious, MoveFirst, and MoveLast methods –Provide Recordset methods to navigate DB  Recordset has two handy properties called BOF and EOF  BOF set when just before first record or record set is empty  EOF set when just after last record

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Using List & Combo Boxes as Data- Bound Controls  List boxes and combo boxes are data aware  Set up a lookup table for a field by using a combo box  You can bind the combo box to a database field and give the List property initial values

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Lookup Table & Navigation  Modify the user interface  Change the properties  Write the code

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Updating a Database File  Recordset object has an Update method that updates the underlying database  Update occurs automatically when a navigation button is clicked  The AddNew method adds records to DB –All bound controls are cleared –Save with Update method or move off the record

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Deleting Records  Delete method of the Recordset object deletes existing record  After a delete operation, move to another record because deleted record is no longer valid With datBooks.Recordset.Delete.Movenext End with

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Preventing Errors  It is bad form for users to encounter errors  Error Trapping intercepts errors before users see them  Limit user’s action when an operation starts  CancelUpdate method cancels record alteration (add or update) and restores a record to its original form

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Hands on Programming Example