SlideShare a Scribd company logo
ADO OBJECT
ADO OBJECT
 ADO is a Microsoft technology
 ADO stands for ActiveX Data Objects
 ADO is a Microsoft Active-X component
 ADO is automatically installed with Microsoft IIS
 ADO is a programming interface to access data in a
database
LIST OF ADO OBJECTS
 ADO Command Object
 ADO Connection Object
 ADO Recordset Object
ADO COMMAND OBJECT
 The ADO Command object is used to execute a single
query against a database. The query can perform
actions like creating, adding, retrieving, deleting or
updating records.
 If the query is used to retrieve data, the data will be
returned as a RecordSet object. This means that the
retrieved data can be manipulated by properties,
collections, methods, and events of the Recordset
object.
 The major feature of the Command object is the ability
to use stored queries and procedures with parameters.
 ProgID
 set
objCommand=Server.CreateObject("ADODB.comma
nd")
Property Description
ActiveConnection Sets or returns a definition for a connection if
the connection is closed, or the current
Connection object if the connection is open
CommandText Sets or returns a provider command
CommandTimeout Sets or returns the number of seconds to wait
while attempting to execute a command
CommandType Sets or returns the type of a Command object
Name Sets or returns the name of a Command object
Prepared Sets or returns a Boolean value that, if set to
True, indicates that the command should save
a prepared version of the query before the first
execution
State Returns a value that describes if the
Command object is open, closed, connecting,
executing or retrieving data
METHODS
Method Description
Cancel Cancels an execution of a method
CreateParameter Creates a new Parameter object
Execute Executes the query, SQL statement
or procedure in the CommandText
property
COLLECTIONS
Collection Description
Parameters Contains all the Parameter objects
of a Command Object
Properties Contains all the Property objects of
a Command Object
ADO CONNECTION OBJECT
 The ADO Connection Object is used to create an
open connection to a data source. Through this
connection, you can access and manipulate a
database.
 If you want to access a database multiple times,
you should establish a connection using the
Connection object. You can also make a connection
to a database by passing a connection string via a
Command or Recordset object. However, this type
of connection is only good for one specific, single
query.
 ProgID
 set objConnection=Server.CreateObject("ADODB.connection")
PROPERTIES
Property Description
Attributes Sets or returns the attributes of a Connection
object
CommandTimeout Sets or returns the number of seconds to wait
while attempting to execute a command
ConnectionString Sets or returns the details used to create a
connection to a data source
ConnectionTimeout Sets or returns the number of seconds to wait for
a connection to open
CursorLocation Sets or returns the location of the cursor service
DefaultDatabase Sets or returns the default database name
IsolationLevel Sets or returns the isolation level
Mode Sets or returns the provider access permission
Provider Sets or returns the provider name
State Returns a value describing if the connection is
open or closed
Version Returns the ADO version number
METHODS
Method Description
BeginTrans Begins a new transaction
Cancel Cancels an execution
Close Closes a connection
CommitTrans Saves any changes and ends the
current transaction
Execute Executes a query, statement,
procedure or provider specific text
Open Opens a connection
OpenSchema Returns schema information from
the provider about the data source
RollbackTrans Cancels any changes in the current
transaction and ends the
transaction
EVENTS
Event Description
BeginTransComplete Triggered after the BeginTrans
operation
CommitTransComplete Triggered after the CommitTrans
operation
ConnectComplete Triggered after a connection starts
Disconnect Triggered after a connection ends
ExecuteComplete Triggered after a command has
finished executing
InfoMessage Triggered if a warning occurs during a
ConnectionEvent operation
RollbackTransComplete Triggered after the RollbackTrans
operation
WillConnect Triggered before a connection starts
WillExecute Triggered before a command is
executed
COLLECTIONS
Collection Description
Errors Contains all the Error objects of the
Connection object
Properties Contains all the Property objects of
the Connection object
ADO RECORDSET OBJECT
 The ADO Recordset object is used to hold a set of records
from a database table. A Recordset object consist of
records and columns (fields).
 In ADO, this object is the most important and the one used
most often to manipulate data from a database.
 ProgID
 set
objRecordset=Server.CreateObject("ADODB.recordset")
CONTINUES..
 When you first open a Recordset, the current
record pointer will point to the first record and the
BOF and EOF properties are False. If there are no
records, the BOF and EOF property are True.
 Recordset objects can support two types of
updating:
 Immediate updating - all changes are written
immediately to the database once you call the Update
method.
 Batch updating - the provider will cache multiple
changes and then send them to the database with the
UpdateBatch method.
CONTINUES..
 In ADO there are 4 different cursor types defined:
 Dynamic cursor - Allows you to see additions, changes, and
deletions by other users.
 Keyset cursor - Like a dynamic cursor, except that you
cannot see additions by other users, and it prevents access to
records that other users have deleted. Data changes by other
users will still be visible.
 Static cursor - Provides a static copy of a recordset for you
to use to find data or generate reports. Additions, changes, or
deletions by other users will not be visible. This is the only
type of cursor allowed when you open a client-side Recordset
object.
 Forward-only cursor - Allows you to only scroll forward
through the Recordset. Additions, changes, or deletions by
other users will not be visible.
PROPERTIES
Property Description
AbsolutePage Sets or returns a value that specifies the
page number in the Recordset object
AbsolutePosition Sets or returns a value that specifies the
ordinal position of the current record in the
Recordset object
ActiveCommand Returns the Command object associated with
the Recordset
ActiveConnection Sets or returns a definition for a connection if
the connection is closed, or the current
Connection object if the connection is open
BOF Returns true if the current record position is
before the first record, otherwise false
Bookmark Sets or returns a bookmark. The bookmark
saves the position of the current record
METHODS
Method Description
AddNew Creates a new record
Cancel Cancels an execution
CancelBatch Cancels a batch update
CancelUpdate Cancels changes made to a record
of a Recordset object
Clone Creates a duplicate of an existing
Recordset
Close Closes a Recordset
CompareBookmarks Compares two bookmarks
Delete Deletes a record or a group of
records
EVENTS
Event Description
EndOfRecordset Triggered when you try to move to a record after the
last record
FetchComplete Triggered after all records in an asynchronous
operation have been fetched
FetchProgress Triggered periodically in an asynchronous operation,
to state how many more records that have been
fetched
FieldChangeComplete Triggered after the value of a Field object change
MoveComplete Triggered after the current position in the Recordset
has changed
RecordChangeComplete Triggered after a record has changed
RecordsetChangeComplete Triggered after the Recordset has changed
COLLECTIONS
Collection Description
Fields Indicates the number of Field
objects in the Recordset object
Properties Contains all the Property objects in
the Recordset object

More Related Content

What's hot

Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
Ngeam Soly
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
Madhuri Kavade
 
ADO.NET
ADO.NETADO.NET
ADO.NET
Wani Zahoor
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
Sharepoint Saturday India Online best practice for developing share point sol...
Sharepoint Saturday India Online best practice for developing share point sol...Sharepoint Saturday India Online best practice for developing share point sol...
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
Madhuri Kavade
 
Share pointtechies linqtosp-andsbs
Share pointtechies linqtosp-andsbsShare pointtechies linqtosp-andsbs
Share pointtechies linqtosp-andsbs
Shakir Majeed Khan
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
 
Ado.net
Ado.netAdo.net
Ado.net
Om Prakash
 
5.C#
5.C#5.C#
Session06 handling xml data
Session06  handling xml dataSession06  handling xml data
Session06 handling xml data
kendyhuu
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
Hemant Sankhla
 
Disconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NETDisconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NET
Everywhere
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19
Preethi Harris
 
2310 b 09
2310 b 092310 b 09
2310 b 09
Krazy Koder
 
Intro to React | DreamLab Academy
Intro to React | DreamLab AcademyIntro to React | DreamLab Academy
Intro to React | DreamLab Academy
DreamLab
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
Fernando G. Guerrero
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
Randy Connolly
 
Diving in the Flex Data Binding Waters
Diving in the Flex Data Binding WatersDiving in the Flex Data Binding Waters
Diving in the Flex Data Binding Waters
michael.labriola
 

What's hot (20)

Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Sharepoint Saturday India Online best practice for developing share point sol...
Sharepoint Saturday India Online best practice for developing share point sol...Sharepoint Saturday India Online best practice for developing share point sol...
Sharepoint Saturday India Online best practice for developing share point sol...
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
 
Share pointtechies linqtosp-andsbs
Share pointtechies linqtosp-andsbsShare pointtechies linqtosp-andsbs
Share pointtechies linqtosp-andsbs
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Ado.net
Ado.netAdo.net
Ado.net
 
5.C#
5.C#5.C#
5.C#
 
Session06 handling xml data
Session06  handling xml dataSession06  handling xml data
Session06 handling xml data
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
 
Disconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NETDisconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NET
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
 
Preethi apex-basics-jan19
Preethi apex-basics-jan19Preethi apex-basics-jan19
Preethi apex-basics-jan19
 
2310 b 09
2310 b 092310 b 09
2310 b 09
 
Intro to React | DreamLab Academy
Intro to React | DreamLab AcademyIntro to React | DreamLab Academy
Intro to React | DreamLab Academy
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Diving in the Flex Data Binding Waters
Diving in the Flex Data Binding WatersDiving in the Flex Data Binding Waters
Diving in the Flex Data Binding Waters
 

Similar to Ado object

Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
Amandeep Kaur
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
Harman Bajwa
 
Ado.net
Ado.netAdo.net
Ado.net
dina1985vlr
 
Ado Net
Ado NetAdo Net
Ado.net
Ado.netAdo.net
Ado.net
pacatarpit
 
jdbc_presentation.ppt
jdbc_presentation.pptjdbc_presentation.ppt
jdbc_presentation.ppt
DrMeenakshiS
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
Abhishek Sur
 
vishual basic data base Pankaj
vishual basic data base Pankajvishual basic data base Pankaj
vishual basic data base Pankaj
Rai Saheb Bhanwar Singh College Nasrullaganj
 
Ado
AdoAdo
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
ukdpe
 
Unit4
Unit4Unit4
Csharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptxCsharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptx
facebookrecovery1
 
Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworks
Luis Goldster
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
Dharani Kumar Madduri
 
6 database
6 database 6 database
6 database
siragezeynu
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
Sonu Vishwakarma
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
Randy Connolly
 
3. ADO.NET
3. ADO.NET3. ADO.NET
3. ADO.NET
Rohit Rao
 
Murach: How to transfer data from controllers
Murach: How to transfer data from controllersMurach: How to transfer data from controllers
Murach: How to transfer data from controllers
MahmoudOHassouna
 
2310 b 10
2310 b 102310 b 10
2310 b 10
Krazy Koder
 

Similar to Ado object (20)

Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
 
Ado.net
Ado.netAdo.net
Ado.net
 
Ado Net
Ado NetAdo Net
Ado Net
 
Ado.net
Ado.netAdo.net
Ado.net
 
jdbc_presentation.ppt
jdbc_presentation.pptjdbc_presentation.ppt
jdbc_presentation.ppt
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
vishual basic data base Pankaj
vishual basic data base Pankajvishual basic data base Pankaj
vishual basic data base Pankaj
 
Ado
AdoAdo
Ado
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Unit4
Unit4Unit4
Unit4
 
Csharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptxCsharp_dotnet_ADO_Net_database_query.pptx
Csharp_dotnet_ADO_Net_database_query.pptx
 
Ado.net & data persistence frameworks
Ado.net & data persistence frameworksAdo.net & data persistence frameworks
Ado.net & data persistence frameworks
 
Database Access With JDBC
Database Access With JDBCDatabase Access With JDBC
Database Access With JDBC
 
6 database
6 database 6 database
6 database
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
 
3. ADO.NET
3. ADO.NET3. ADO.NET
3. ADO.NET
 
Murach: How to transfer data from controllers
Murach: How to transfer data from controllersMurach: How to transfer data from controllers
Murach: How to transfer data from controllers
 
2310 b 10
2310 b 102310 b 10
2310 b 10
 

Recently uploaded

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

Ado object

  • 2. ADO OBJECT  ADO is a Microsoft technology  ADO stands for ActiveX Data Objects  ADO is a Microsoft Active-X component  ADO is automatically installed with Microsoft IIS  ADO is a programming interface to access data in a database
  • 3. LIST OF ADO OBJECTS  ADO Command Object  ADO Connection Object  ADO Recordset Object
  • 4. ADO COMMAND OBJECT  The ADO Command object is used to execute a single query against a database. The query can perform actions like creating, adding, retrieving, deleting or updating records.  If the query is used to retrieve data, the data will be returned as a RecordSet object. This means that the retrieved data can be manipulated by properties, collections, methods, and events of the Recordset object.  The major feature of the Command object is the ability to use stored queries and procedures with parameters.  ProgID  set objCommand=Server.CreateObject("ADODB.comma nd")
  • 5. Property Description ActiveConnection Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open CommandText Sets or returns a provider command CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command CommandType Sets or returns the type of a Command object Name Sets or returns the name of a Command object Prepared Sets or returns a Boolean value that, if set to True, indicates that the command should save a prepared version of the query before the first execution State Returns a value that describes if the Command object is open, closed, connecting, executing or retrieving data
  • 6. METHODS Method Description Cancel Cancels an execution of a method CreateParameter Creates a new Parameter object Execute Executes the query, SQL statement or procedure in the CommandText property
  • 7. COLLECTIONS Collection Description Parameters Contains all the Parameter objects of a Command Object Properties Contains all the Property objects of a Command Object
  • 8. ADO CONNECTION OBJECT  The ADO Connection Object is used to create an open connection to a data source. Through this connection, you can access and manipulate a database.  If you want to access a database multiple times, you should establish a connection using the Connection object. You can also make a connection to a database by passing a connection string via a Command or Recordset object. However, this type of connection is only good for one specific, single query.  ProgID  set objConnection=Server.CreateObject("ADODB.connection")
  • 9. PROPERTIES Property Description Attributes Sets or returns the attributes of a Connection object CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command ConnectionString Sets or returns the details used to create a connection to a data source ConnectionTimeout Sets or returns the number of seconds to wait for a connection to open CursorLocation Sets or returns the location of the cursor service DefaultDatabase Sets or returns the default database name IsolationLevel Sets or returns the isolation level Mode Sets or returns the provider access permission Provider Sets or returns the provider name State Returns a value describing if the connection is open or closed Version Returns the ADO version number
  • 10. METHODS Method Description BeginTrans Begins a new transaction Cancel Cancels an execution Close Closes a connection CommitTrans Saves any changes and ends the current transaction Execute Executes a query, statement, procedure or provider specific text Open Opens a connection OpenSchema Returns schema information from the provider about the data source RollbackTrans Cancels any changes in the current transaction and ends the transaction
  • 11. EVENTS Event Description BeginTransComplete Triggered after the BeginTrans operation CommitTransComplete Triggered after the CommitTrans operation ConnectComplete Triggered after a connection starts Disconnect Triggered after a connection ends ExecuteComplete Triggered after a command has finished executing InfoMessage Triggered if a warning occurs during a ConnectionEvent operation RollbackTransComplete Triggered after the RollbackTrans operation WillConnect Triggered before a connection starts WillExecute Triggered before a command is executed
  • 12. COLLECTIONS Collection Description Errors Contains all the Error objects of the Connection object Properties Contains all the Property objects of the Connection object
  • 13. ADO RECORDSET OBJECT  The ADO Recordset object is used to hold a set of records from a database table. A Recordset object consist of records and columns (fields).  In ADO, this object is the most important and the one used most often to manipulate data from a database.  ProgID  set objRecordset=Server.CreateObject("ADODB.recordset")
  • 14. CONTINUES..  When you first open a Recordset, the current record pointer will point to the first record and the BOF and EOF properties are False. If there are no records, the BOF and EOF property are True.  Recordset objects can support two types of updating:  Immediate updating - all changes are written immediately to the database once you call the Update method.  Batch updating - the provider will cache multiple changes and then send them to the database with the UpdateBatch method.
  • 15. CONTINUES..  In ADO there are 4 different cursor types defined:  Dynamic cursor - Allows you to see additions, changes, and deletions by other users.  Keyset cursor - Like a dynamic cursor, except that you cannot see additions by other users, and it prevents access to records that other users have deleted. Data changes by other users will still be visible.  Static cursor - Provides a static copy of a recordset for you to use to find data or generate reports. Additions, changes, or deletions by other users will not be visible. This is the only type of cursor allowed when you open a client-side Recordset object.  Forward-only cursor - Allows you to only scroll forward through the Recordset. Additions, changes, or deletions by other users will not be visible.
  • 16. PROPERTIES Property Description AbsolutePage Sets or returns a value that specifies the page number in the Recordset object AbsolutePosition Sets or returns a value that specifies the ordinal position of the current record in the Recordset object ActiveCommand Returns the Command object associated with the Recordset ActiveConnection Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open BOF Returns true if the current record position is before the first record, otherwise false Bookmark Sets or returns a bookmark. The bookmark saves the position of the current record
  • 17. METHODS Method Description AddNew Creates a new record Cancel Cancels an execution CancelBatch Cancels a batch update CancelUpdate Cancels changes made to a record of a Recordset object Clone Creates a duplicate of an existing Recordset Close Closes a Recordset CompareBookmarks Compares two bookmarks Delete Deletes a record or a group of records
  • 18. EVENTS Event Description EndOfRecordset Triggered when you try to move to a record after the last record FetchComplete Triggered after all records in an asynchronous operation have been fetched FetchProgress Triggered periodically in an asynchronous operation, to state how many more records that have been fetched FieldChangeComplete Triggered after the value of a Field object change MoveComplete Triggered after the current position in the Recordset has changed RecordChangeComplete Triggered after a record has changed RecordsetChangeComplete Triggered after the Recordset has changed
  • 19. COLLECTIONS Collection Description Fields Indicates the number of Field objects in the Recordset object Properties Contains all the Property objects in the Recordset object