The ActiveX Data Object (ADO) module is a programming model that enables programs in C++ and Visual Basic to be connected to a database or SQL server.
It includes different types of objects, such as the ADO connection object. This object creates an open connection with a data source. With the help of this connection, we can access and manipulate the database.
We can establish the connection with the help of a connection object if we want to access the database multiple times.
The connection object has certain properties associated with it, which are described below.
Mode: This sets or returns the provider access permissions. It can only be set once the connection object has been closed.
Version: This returns the ADO version number.
State: This sets or returns the value that describes whether the connection is open or closed.
Provider: This sets or returns the provider name. This property is read/write if the connection is closed. However, it is read-only if the connection is open.
Attributes: This sets or returns the attributes of a connection object as a long value. For a connection object, this property is read/write.
IsolationLevel: This sets or returns the isolation level and is a read/write property.
DefaultDatabase: This sets or returns the name of the default database as a string value.
ConnectionTimeout: This sets or returns the number of seconds to wait for a connection to open before it is terminated and an error is raised.
ConnectionString: This sets or returns the details which are used to create a connection with the data source.
CommandTimeout: This sets or returns the number of seconds to wait if we want to execute a command before the command is terminated.
CursorLocation: This sets or returns the location of a cursor service as a long value of the CursorLocationEnum type.
Free Resources