FACTOID # 135: The Pitcairn Islands have the world’s shortest highway system, with only 6.4 kilometers of road. They also have the fourth-fewest main phone lines.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > ActiveX Data Objects

Contents

Definition

Microsoft ActiveX Data Objects (ADO) is a set of Component Object Model objects for accessing data sources. It provides a layer between programming languages and OLE DB (a means of accessing data stores, whether they be databases or otherwise, in a uniform manner), which allows a developer to write programs which access data, without knowing how the database is implemented. You must be aware of your database for connection only. No knowledge of SQL is required to access a database when using ADO, although one can use ADO to execute arbitrary SQL commands. The disadvantage of this (i.e. using SQL directly) is that it introduces a dependency upon the type of database used. Component Object Model (COM) is a platform for software componentry introduced by Microsoft in 1993. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... OLE DB (sometimes written as OLEDB or OLE-DB), Object Linking and Embedding for Databases, is a means Microsoft use for accessing different types of data stores in a uniform manner. ... This article is about computing. ... SQL (IPA: or IPA: ), commonly expanded as Structured Query Language, is a computer language designed for the retrieval and management of data in relational database management systems, database schema creation and modification, and database object access control management. ...


It is positioned as a successor to Microsoft's earlier object layers for accessing data sources, including RDO (Remote Data Objects) and DAO (Data Access Objects). ADO was introduced by Microsoft in October 1996. RDO is a Microsoft technology (since deprecated) that stands for Remote Data Objects, allowing you to create interfaces that can directly call ODBC. This is useful for speed, overall control, and also makes your job a lot easier when youre programming. ... Data Access Objects (DAO) were an object oriented interface created by Microsoft which allowed early versions of Microsoft Access and Visual Basic the Jet database engine. ... Microsoft Corporation, (NASDAQ: MSFT, HKSE: 4338) is a multinational computer technology corporation with global annual revenue of US$44. ...


ADO consists of several top-level objects:

  • Connection Object - represents the connection to the database.
  • Recordset Object - represents a set of database records.
  • Command Object - represents a SQL command.
  • Record Object - represents a set of data, typically from a source other than a database.
  • Stream Object - represents a stream of data, as from a text file or web page.
  • Error Object - stores errors.
  • Field Object - represents a database field.
  • Parameter Object - represents a SQL parameter.
  • Property Object - stores information about objects.

The ADO components are usually used in conjunction with a high-level language such as VBScript in an ASP environment or Visual Basic. However, languages such as Delphi and C++ Builder, development environments from Microsoft rival Borland Software Corporation, also allow the use of ADO to access various databases. A Database Connection is the method in computer science that allows client software to talk to database server software, whether these exist on the same machine or not. ... VBScript (short for Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft. ... Active Server Pages (ASP) is Microsofts server-side script engine for dynamically-generated web pages. ... This article is about the Visual Basic language shipping with Microsoft Visual Studio 6. ... Delphi has been released in many versions, including older versions which have been released in magazines for non-profit application use For the language Borland Delphi is programmed in, see Object Pascal. ... C++ Builder, often abbreviated BCB, is a popular rapid application development (RAD) environment produced by Borland for writing programs in the C++ programming language. ... Borland Software Corporation is a software company headquartered in Austin, Texas. ...


In the newer programming framework of .NET, Microsoft also presented an upgraded version of ADO called ADO.NET. Its object structure is quite different from that of traditional ADO. Microsoft . ... Microsoft Corporation, (NASDAQ: MSFT, HKSE: 4338) is a multinational computer technology corporation with global annual revenue of US$44. ... ADO.NET is a set of computer software components that can be used by programmers to access data and data services. ...


Usage

Some basic steps are required in order to be able to access and manipulate data using ADO :

  1. Create a connection object to connect to the database.
  2. Create a recordset object in order to receive data in.
  3. Open the connection
  4. Populate the recordset by opening it and passing the desired table name or SQL statement as a parameter to open function.
  5. Do all the desired searching/processing on the fetched data.
  6. Commit the changes you made to the data (if any) by using Update or UpdateBatch methods.
  7. Close the recordset
  8. Close the connection

ASP Example

Here is an ASP example using ADO to select the "Name" field, from a table called "Phonebook", where a "PhoneNumber" was equal to "555-5555".

 dim myconnection, myrecordset, name set myconnection = server.createobject("ADODB.Connection") set myrecordset = server.createobject("ADODB.Recordset") myconnection.open mydatasource myrecordset.open "Phonebook", myconnection myrecordset.find "PhoneNumber = '555-5555'" name = myrecordset.fields.item("Name") myrecordset.close set myrecordset = nothing set myconnection = nothing 

This is equivalent to the following ASP code, which uses plain SQL instead of the functionality of the Recordset object:

 dim myconnection, myrecordset, name set myconnection = server.createobject("ADODB.connection") myconnection.open mydatasource set myrecordset = myconnection.execute("SELECT Name FROM Phonebook WHERE PhoneNumber = '555-5555'") name = myrecordset(0) myrecordset.close set myrecordset = nothing set myconnection = nothing 

VBA Example

This is a Microsoft Access VBA example to update a name of an item, from a table called "items", where "item_code" is equal to "GI8293-23"

 Dim myconnection as new ADODB.Connection Dim myrecordset as new ADODB.Recordset Set myconnection = CurrentProject.AccessConnection myrecordset.Open "items", myconnection, adOpenKeyset, adLockOptimistic, adCmdTable myrecordset.find "item_code = 'GI8293-23'" if (not myrecordset.EOF) 'If the specified criteria cannot be satisfied, then the current record is EOF myrecordset!item_name = "My New Item" end if myrecordset.update 'Actually commit the update to the data source myrecordset.close myconnection.close 

Software support

ADO was supported in ASP and in VBA for Office.


See also

ADO.NET ADO.NET is a set of computer software components that can be used by programmers to access data and data services. ...


External links


  Results from FactBites:
 
ActiveX Data Objects - Wikipedia, the free encyclopedia (411 words)
It provides a layer between programming languages and OLE DB (a means of accessing data stores, whether they be databases or otherwise, in a uniform manner), which allows a developer to write programs which access data, without knowing how the database is implemented.
ADO was introduced by Microsoft in the winter of 1996.
The ADO components are usually used in conjunction with a high-level language such as VBScript in an ASP environment or Visual Basic.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.