Вниз
Скачать: CL | DM;

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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
4-99415
shu_3d
2002-11-13 12:21
2002.12.30
Неправильные размеры при рисовании через winAPI


6-99238
megatrend
2002-10-31 15:20
2002.12.30
twebbrowser


14-99326
Sergo
2002-12-09 12:27
2002.12.30
FM-карта


14-99288
kingdom
2002-12-06 20:06
2002.12.30
Нужна информация по Install Shield Professional ?


14-99267
Grifon
2002-12-05 15:20
2002.12.30
Как убежать от дяди Сэма?




   Наверх