Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab10 Interacting with Data (Database Management)

Slides:



Advertisements
Similar presentations
Basics of Database Programming with VB6
Advertisements

Microsoft Access.
Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
1 After completing this lesson, you will be able to: Create a database. Create a table using the Table Wizard. Create and modify a table in Design view.
Data Base. Objective Become familiar with database terminology. Create a project to display data for a single database table. Use a DataGrid control.
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Using Macros and Visual Basic for Applications (VBA) with Excel
Access Lesson 2 Creating a Database
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Chapter 1 Databases and Database Objects: An Introduction
Integrating Access with the Web and with Other Programs.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Access Tutorial 1 Creating a Database
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab3 Check Boxes,Option Buttons Frame Control Frame Control MsgBox, InputBox Functions Day7.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 بسم الله الرحمن الرحيم Palestine Polytechnic University College of Administrative science and.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab2 Managing Controls.
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Copyright © 2001 by Wiley. All rights reserved. Chapter 10: Advanced Database Operations Revising Vintage Videos Setting RecordSource at run time DBGrid.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Chapter 1 Databases and Database Objects: An Introduction
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
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 Office 2013 Access Building a Database and Defining Table Relationships.
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.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Examining.
Lesson 17 Getting Started with Access Essentials
Course ILT Access basics Unit objectives Define database and database-related terminology, and plan a database Start Access and open, create, view, and.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
Key Applications Module Lesson 21 — Access Essentials
Working with GridView Control: Adding Columns. Adding Buttons to a Bound GridView: 1. Drag the WebProduct table from Data connection to a page 2. Demo.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
® Microsoft Office 2013 Access Creating a Database.
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.
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.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
Microsoft Excel 2003 Illustrated Complete Data with Other Programs Exchanging.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 25.1 Test-Driving the ATM Application 25.2.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
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.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
DATABASE SYSTEM VB LINK TO MS-SQL. 2 Visual ProgrammingChapter 6 Select Project -> Component.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
ACCESS LESSON 1 DATABASE BASICS VOCABULARY. BACKSTAGE VIEW A menu of options and commands that allows you to access various screens to perform common.
1 Access Lesson 1 Understanding Access Fundamentals Microsoft Office 2010 Fundamentals Story / Walls.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 1 Creating a Database
Objectives Create an action query to create a table
Access Tutorial 1 Creating a Database
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Access Lesson 2 Creating a Database
Microsoft Office Access 2003
Microsoft Office Access 2003
Lessons Vocabulary Access 2016.
Chapter 1 Databases and Database Objects: An Introduction
Access Tutorial 1 Creating a Database
Access Tutorial 1 Creating a Database
Unit J: Creating a Database
Presentation transcript:

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab10 Interacting with Data (Database Management)

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 2 Database Concept Database: An integrated collection of data. Table: One data file (Set of records). Dbase: Collection of tables. Record: Set of fields. Field: Set of characters. Index: A key field with unique values for every record.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 3 Flat-File (Table) Row - Record Fields - Columns Database Concept …[CONT]

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 4 Relational Database: Collection of tables in which no duplicate data is found. Database file Extension: FileName.MDB Ms-Database(MDB) Contents: –Tables –Reports –Forms –Queries Database Concept …[CONT]

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 5 Creating New Database Visual Data Manager: A program available with in the VB environment used to create databases. V.Data Manager Tasks: –Create a new database. –Enter A new data into data file. –Edit existing dbase. –Searching.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 6 Executing Visual Data Manager 1- From Add-Ins menu select Visual Data Manager. 2- Visual Data Window appears. Visual Data Window

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 7 Creating Database 1- File menu => New => Microsoft Access => version 7.0 MDB. 2- Save the new database in the dialog box that appears. 3- The DataBase window will appear: Database format ( MsAccess,Dbase, FxPro …)

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 8 4- Select Properties. Right Click the mouse. Choose New Table.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 9 Creating Database …. [CONT] 5- Add Table Name. Add the Fields & Indexes. Build the Table.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 10 Using the Database You can add, update, delete data from the database as follow: Open the Dbase in the Database window. Open the table ( Double click or Right click to the mouse). Add, Update, Delete data. Close to return to the database window.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 11 Data Control The data control enables you to access the database. Add data control to the form. Specify the following properties: –Database name –Record source –Caption.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 12 Linking Dbase fields with form’s Controls Choose Label or Textbox control Change the following properties: –Data source (the data control name) –Data field. ( table field name )

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 13 Advanced Data Control Usage Data Control Methods: MoveFirst, MoveLast, MoveNaxt, MovePrevious, AddNew, Delete. Using Data Control Methods: Syntax DatacontrolName. Recordset.Method Example: Data1.RecordSet.AddNew

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 14 Data Control Properties Data1.Recordset.EOF return True when reach the end of the file (table) Data1.Recordset.BOF return True when reach the beginning of the file (table) Data1.Recordset.Fields(“fieldname”).value returns the value of the field

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 15 ADO Data Control Data Grid Control ADO stands for: ActiveX Data Object ADO data control : Enables accessing the database by VB program. Data Grid Control: Display in a table format the data requested form the database.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 16 Adding ADO & Data Grid Controls to the ToolBox From the project menu select components (CTRL T) From the dialog box select: –Microsoft ADO Data control 6.0. –Microsoft DatGrid Control 6.0. Click Ok button. Now you can see two new controls appears at the end of the tool box.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 17 Designing ADO Control Add the ADO control to the form. Change the following properties: Connection String: –Provider : Microsoft jet 3.51 OLE DB Provider. –Select Dbase name. –Test Connections. Record Source: –Command Type: 2-adcmdTable. –Table: TableName –Apply

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 18 Designing Data Grid Control Add Data Grid control to the form. Change the following properties: Data Source: Specify the ADO Name. Right Click the mouse. Select Retrieve Fields. From properties window assign the access type to the database ( Add, Delete….).

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 19 Data Grid Control Properties AllowAddNew (True/False): Enables to add new records. AllowUpdate(True/False): Enables to update records. AllowDelete(True/False): Enables to delete a specified record.

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 20 Data Grid Control Properties Col: (Column number): Enables you to specify a column. Row( Row Number): enables you to specify a row. Text: The text in the specified cell from Row&Col. Example: Datagrid1.Row=0: Datagrid1.Col=0 Print Datagrid1.text

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 21 Lab Training Using the MDI, design the following interface

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 22 Lab Training [CONT]

Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 23 Lab10End