ActiveX Data Objects (ADO)

Slides:



Advertisements
Similar presentations
Basics of Database Programming with VB6
Advertisements

ADO DB in Access VBA © Walter Milner 2005 Slide: 1 ADO VBA Programming in Access.
Connecting to Database 21 Feb Database Options Can use many different databases in conjunction with php. – MySql; MS Access; Oracle; etc etc Most.
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
ActiveX Data Object ISYS 562. ADO An ActiveX control ActiveX is build upon COM, a contract that defines a standard interface by which objects communicate.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Using Objects and Properties
Object-Oriented Application Development Using VB.NET 1 Chapter 13 Introduction to Data Access Classes and Persistence.
Visual Basic Database Access BICS546. Microsoft Universal Data Access OLE DB: The OLE database protocol –Allows a program to access information in any.
CIS 451: ASP Recordsets Dr. Ralph D. Westfall May, 2002.
1 Chapter 8 Object-Based Programming in VBA. 8 Chapter Objectives Declare and use object variables Create procedures that use built-in form methods Find.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
ASP & ADO. Connection Object An implicit connection is created when we open a recordset without a connection object. –rs.open “Customer”, "DSN = Sales”
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
Microsoft Access Ervin Ha.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ADO Recordsets. Recordset Objects Similar to Tables and Queries: data Using VBA/VBScript you… –Open a recordset, –Locate a record –Update or add a record.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
ActiveX Data Object (ADO) in JavaScript J.L.Wang, Yen-Cheng Chen Dept. of Infomation Management Ming-Chuan University Jan
1 VBScript Session What we learn last session?
Introduction to ADO By David R. Stevenson Consulting Software Engineer ABB Automation.
Database 20/2/12 Connection. 
Using Visual Basic 6.0 to Create Web-Based Database Applications
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 11 Accessing Database.
Web Services Week 8 Aims: –Using web services as front ends to databases Objectives: –Review of relational databases –Connecting to and querying databases.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Lecture Note 10: Simple Database Techniques. Introduction –Database System –Access, SQL Server and others. –Microsoft Access - Interacting with this databases.
Visual Basic ADO Programming 56:150 Information System Design.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
How to Connect to Database ODBC (Open Database Connectivity) ADO (ActiveX Data Object) ASP Code To Connect to Database Recordset Object Navigating through.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard set of objects to refer.
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.
Chapter 9 Building the Shopping cart Objective Creating Shopping cart using session Variable. Creating a shopping cart using a database table. Use the.
Controlling User Access. 2 home back first prev next last What Will I Learn? Compare the difference between object privileges and system privileges Construct.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
HNDIT Rapid Application Development
ADO ActiveX Data Object. ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard.
Visual Basic for Application - Microsoft Access 2003 Finishing the application.
Source = Table rsObject.Open tablename, Connection Object, CursorType, LockType, adCmdTable Source = Stored Procedure rsObject.Open stored procedure name,
7-1 Active Server and ADO Colorado Technical University IT420 Tim Peterson.
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.
ADO & Recordsets. ADO Description & History  ActiveX Data Objects  History  1991 ODBC  Data Access Objects (DAO) for VB developers (JET)  Remote.
Using databases ActiveX Data Objects (ADO) Connecting to a database Reading data from a database Inserting, updating and deleting records Using databases.
Lecture 4 Manipulating Form Data using methods of Recordset and RecordsetClone in VBA Restrict data with filter 1 Rapid Application Development.
 2 Data Object Library approaches ◦ DAO (Data Access Objects)  Original access strategy (up to VB6)  Closely linked to MS Access ◦ ADO (ActiveX Data.
ASP.NET Programming with C# and SQL Server First Edition
Visual Basic Database Access
Accessing the Database Server: ODBC, OLE DB, and ADO
Running a Forms Developer Application
Data Access Objects .
DBMS & TPS Barbara Russell MBA 624.
ADO VBA Programming in Access
Working in the Forms Developer Environment
INT213 Updating the Database.
Lecture 6 VB.Net SQL Server.
IS444: Modern tools for applications development
IS444: Modern tools for applications development
VB.NET Using Database.
ربط الفيجوال بيسك VB مع قواعد البيانات
VISUAL BASIC INTRODUCTION TO DATA CONNECTIVITY.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Database Objects 1/12/2019 See scm-intranet.
Chapter 10 ADO.
Unit – V Data Controls.
Presentation transcript:

ActiveX Data Objects (ADO) Performs same functions as DAO with following improvements: Simpler command set Faster execution (sometimes) Uses less memory Consumes less disk space Supports any database to which Access can connect

ActiveX Data Objects (ADO) Connection object Establishes a link to a database ADO objects should be prefixed with ADODB Set statement is optional when assigning values to ADO objects, if you use the New keyword Example: Connection property of CurrentProject stores a reference to the current database. Dim cnn As New ADODB.Connection Cnn.Open CurrentProject.Connection OR Set cnn = CurrentProject.Connection

ActiveX Data Objects (ADO) Opening a recordset Arguments Table or query SQL statements may be embedded Database connection Usually the current one stored in the Connection object variable Cursor types Lock types

ActiveX Data Objects (ADO) Cursor types adOpenForwardOnly Read only recordset with ability to scroll through the records in a forward direction only adOpenKeyset Requests a dynaset that can be updated adOpenDynamic Updateable, but not available for Jet databases adOpenStatic Read only where updates are not visible OpenKeyset is the type to use

ActiveX Data Objects (ADO) Lock types adLockReadOnly No changes allowed adLockPessimistic Lock the record immediately upon entering adLockOptimistic Attempt to lock the record when the record is saved adLockBatchOptimistic Used for batch updating Prefer optimistic locking

ActiveX Data Objects (ADO) Update method Changes saved using Update, moving to another record or closing the recordset In DAO, only Update method saves the changes Find method Replaces FindFirst, FindLast, etc. from DAO Update method in either case is highly recommended

ActiveX Data Objects (ADO) Edit method ADO automatically opens in an edit mode DAO requires Edit method Both use AddNew and Delete; most other methods are similar to DAO

ADO or DAO? ADO is a generic interface to multiple database providers Useful for building client/server and web applications DAO is best performer for Jet (Access) databases ADO has to retrieve info about the database before it can communicate with it ADO has security shortcomings for Jet databases ADO good for SQL server, Oracle Microsoft is not going to upgrade DAO any more. Security: When creating new users and groups programmatically, ADO does not return the personal identifier for the new user or group. If you lose the file that stores the personal identifiers, you may not be able to recreate it.