Учебники ASP

ГЛАВНАЯ АСП

Учебник по WP

Введение в веб-страницы Веб-страницы Razor Макет веб-страниц Папки веб-страниц Веб-страницы Глобальные Формы веб-страниц Объекты веб-страниц Файлы веб-страниц Базы данных веб-страниц Помощники веб-страниц Веб-страницы Графики веб-страниц Электронная почта веб-страниц Безопасность веб-страниц Публикация веб-страниц Примеры веб-страниц Классы веб-страниц

Бритва ASP.NET

Введение в бритву Синтаксис бритвы Переменные Razor C# Циклы Razor C# Логика Razor C# Переменные Razor VB Циклы Razor VB Логика Бритвы В.Б.

АСП Классик

Введение в ASP Синтаксис ASP ASP-переменные Процедуры ASP Условия ASP Зацикливание ASP ASP-формы Файлы cookie ASP ASP-сеанс ASP-приложение ASP #include ASP Global.asa АСП АЯКС Электронная почта ASP Примеры ASP

Справочник ASP

Функции ASP VB Ключевые слова ASP VB Ответ ASP ASP-запрос ASP-приложение ASP-сеанс ASP-сервер Ошибка ASP Файловая система ASP Текстовый поток ASP ASP-диск ASP-файл Папка ASP Словарь АСП ASP AdRotator ASP BrowserCap Связывание контента ASP Ротатор контента ASP Быстрая ссылка ASP

Учебник по ADO

Введение в ADO АДО Коннект Набор записей ADO Дисплей АДО ADO-запрос Сортировка ADO ADO Добавить Обновление ADO АДО Удалить Демонстрация ADO Ускорение ADO

Объекты АДО

Команда АДО ADO-соединение Ошибка ADO Поле ADO ADO-параметр Свойство АДО ADO-запись Набор записей ADO ADO-поток Типы данных ADO

Объект подключения 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++ могут обрабатывать события).

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

Коллекции

Collection Description
Errors Contains all the Error objects of the Connection object
Properties Contains all the Property objects of the Connection object