Re: Memory Leak. SQL Server sp3a, VB and MDAC 2.8

From: Jerry Pisk (jerryiii_at_hotmail.com)
Date: 07/30/04


Date: Thu, 29 Jul 2004 17:14:46 -0700

You need to Set rsFZReport to Nothing even when it's closed. And closing a
closed recordset is fine, so take the condition out and just run the Close
and Set ... = Nothing.

Jerry

"pete" <pete@madpete.freeserve.co.uk> wrote in message
news:41092d7c$0$7126$db0fefd9@news.zen.co.uk...
> Can anyone give me some sugguestions here.
> Connection is declared at the start of the application
> Set rsFZReport.ActiveConnection = conn
>
> Then a function repeatly opens recordsets like this -
>
> rsFZReport.Open sRS, , adOpenStatic, adLockReadOnly, adCmdText
> .
>
> .
> reporting code etc
> ..
>
> If rsFZReport.State > 0 Then
> rsFZReport.Close
> Set rsFZReport= Nothing
> endif
>
>
> Using VB Watch debugger, the close and set nothing do NOT release any
> memory. It just keeps increasing. The application connects to multiple
> databases and many tables, so its uses about 10Mb/minute.
> (I don't think its of relavance but Form.show uses memory but form.unload
> doesn't release any back)
> I've installed SP3a and MDAC 2.8 to no avail. Anyone have any ideas or
> know
> what I can do?
>
>
> msado27.tlb 2.80.1022.0
> MSSQL Server SP3a (3 has a memory leak apparently)
> VB6, SP6
> Sqlsrv32.dll caused a leak on NT4 SP6, but upgrading it on my win2k SP4
> server/workstation (they are both and the same) to this
> Sqlsrv32.dll 2000.85.1022.0
> doesn't help.
> Provider=SQLOLEDB;Data Source=theServer;Initial Catalog=theDB;User
> ID=uid;Password=thepwd;OPTION=3;connect timeout=240;
>
>