Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2002.12.30;
Скачать: [xml.tar.bz2];

Вниз

ADO не освобождает ресурсы !!!   Найти похожие ветки 

 
SashaK   (2002-12-09 17:39) [0]

Приветсвую всех.

Я обнаружил очень странное(для меня) поведение ADO (у меня 2.7). Создаю соединение TADOConnection, неважно как я пробовал в основном потоке и в отдельном. Выполняю запрос, закрываю соединение и удаляю объект ADOConnection. A соединение остается!!! Я смотрел через QueryAnalyzer в sysprocesses. Получается что ADO не освобождает ресурсы(неужели ADO такое кривое) и это соединение будет уничтожено только после завершения приложения. Поэтому возникает вопрос: как рабоать через ADO если нужно динамически создвать и удалять несколько соединений?


 
kig   (2002-12-09 23:07) [1]

OLE DB Resource Pooling
OLE DB resource pooling, also known as OLE DB session pooling, is handled by the OLE DB core components. To take advantage of resource pooling, an OLE DB consumer must invoke the data provider by using either the IDataInitialize or the IDBPromptInitialize interface. (ADO will attempt to do this automatically.) OLE DB resource pooling can be turned on for one provider and off for another.



DBPROP_INIT_OLEDBSERVICES
Property group: Initialization

Property set: DBPROPSET_DBINIT

Type: VT_I4

Typical R/W: R/W

Description: OLE DB Services

A bitmask specifying OLE DB services to enable or disable. To use this property, the provider must support service components and must have been invoked with IDataInitialize on the OLE DB Initialization core service. For more information about OLE DB services, see "OLE DB Services." This property overrides the settings of the OLEDB_SERVICES registration key. For more information about these settings, see "Overriding Provider Service Defaults" and related topics. A combination of zero or more of the following:

DBPROPVAL_OS_RESOURCEPOOLING—Resources should be pooled.
DBPROPVAL_OS_TXNENLISTMENT—Sessions in a Component Services (or MTS, if you are using Microsoft® Windows NT®) environment should automatically be enlisted in a global transaction where required.
DBPROPVAL_OS_ENABLEALL (default)—All services should be invoked. By default, all services are enabled and invoked as requested. Individual services can be deselected by specifying the bitwise-AND of DBPROPVAL_OS_ENABLEALL along with the bitwise complement of any services to be deselected. For example, DBPROPVAL_OS_ENABLEALL &~DBPROPVAL_OS_TXNENLISTMENT enables all services except automatic transaction enlistment in the Component Services environment.
DBPROPVAL_OS_DISABLEALL—All services should be disabled.
DBPROPVAL_OS_AGR_AFTERSESSION—Indicates support for services operating beyond the session level, such as the Client Cursor Engine. For maximum performance, consumers should not set this bit if such services are not required. The setting for DBPROPVAL_OS_AGR_AFTERSESSION will be ignored if contraindicated by another bit setting. For example, if DBPROPVAL_OS_CLIENTCURSOR is set, the value for DBPROPVAL_OS_AGR_AFTERSESSION is ignored.
DBPROPVAL_OS_CLIENTCURSOR—Enables the Client Cursor Engine as needed, to support rowset behavior requested by the consumer and not implemented by the native provider. When this bit is set, the value for DBPROPVAL_OS_AGR_AFTERSESSION is ignored.



Страницы: 1 вся ветка

Форум: "Базы";
Текущий архив: 2002.12.30;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.008 c
3-98952
gunner
2002-12-06 11:24
2002.12.30
Проблема вызова функции из сервиса соединения с БД из DLL


14-99275
Вадим
2002-12-08 18:27
2002.12.30
Samsung CRT 959NF 19


1-99089
chsv
2002-12-16 20:12
2002.12.30
специальный графический формат


3-99005
volph7777
2002-12-10 11:38
2002.12.30
SQL-запрос с двух DBF-фпйлов


3-98968
Dbrf
2002-12-10 09:03
2002.12.30
Редактирование записей





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский