Объект подключения ADO
Объект соединения
Объект подключения ADO используется для создания открытого подключения к источнику данных. Через это соединение вы можете получить доступ к базе данных и управлять ею.
Если вы хотите получить доступ к базе данных несколько раз, вы должны установить соединение с помощью объекта Connection. Вы также можете установить соединение с базой данных, передав строку соединения через объект Command или Recordset. Однако этот тип подключения подходит только для одного конкретного запроса.
Идентификатор программы
set objConnection=Server.CreateObject("ADODB.connection")
Характеристики
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 |
Методы
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 |
События
Примечание. Вы не можете обрабатывать события с помощью VBScript или JScript (только языки Visual Basic, Visual C++ и Visual J++ могут обрабатывать события).
Коллекции
Collection |
Description |
Errors |
Contains all the Error objects of the Connection object |
Properties |
Contains all the Property objects of the Connection object |