PRB: Memory Leak When MDAC Is Running on Windows NT 4.0 (305676)
The information in this article applies to:
- Microsoft Data Access Components 2.6, when used with:
- the operating system: Microsoft Windows NT 4.0
- Microsoft Data Access Components 2.6 SP1, when used with:
- the operating system: Microsoft Windows NT 4.0
- Microsoft Data Access Components 2.7, when used with:
- the operating system: Microsoft Windows NT 4.0
- Microsoft ODBC Driver for SQL Server 2000.80.194
This article was previously published under Q305676 SYMPTOMS
When you use the ODBC Driver for SQL Server with MDAC 2.6 or later under Windows NT 4.0, you may notice a memory leak.
CAUSE
This problem occurs because Dbnetlib.dll does not stay in memory.
RESOLUTION
There are two ways to work around this problem:
- Use the OLE DB provider for SQL Server.
- Make the following code changes:
- Add the following application programming interface (API) declaration to a module in your project:
Public Declare Function LoadLibrary Lib "kernel32" & _
Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
- Add the following code, which forces Dbnetlib.dll to stay in memory:
Dim handle As Long
Dim DLLName As String
' DBNETLIB.DLL should be located in the NT System directory.
DLLName = "C:\WINNT\System32\DBNETLIB.DLL"
handle = LoadLibrary(DLLName)
Modification Type: | Major | Last Reviewed: | 5/8/2003 |
---|
Keywords: | kbprb KB305676 |
---|
|