Re: close recordset before nothing

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Val Mazur (group51a_at_hotmail.com)
Date: 06/01/04


Date: Tue, 1 Jun 2004 18:17:00 -0400

Hi Vicky,

If you do not do this, then you might experience a memory leaks. In VB6
there is no garbage collector as in .NET, so most likely recordset resources
will reserve memory until you exit application. It is always a good idea to
release resources and it does not require big coding.

-- 
Val Mazur
Microsoft MVP
"Vicky" <vicky@hh.com> wrote in message 
news:eeC98P6REHA.1312@TK2MSFTNGP12.phx.gbl...
> Its is always said closing a recordset before setting it to nothing is 
> good
> practice. Why is it so and what actually is happening behind when we do so
>
> Thnaks
>
> 


Relevant Pages

  • Re: close recordset before nothing
    ... If you do not do this, then you might experience a memory leaks. ... there is no garbage collector as in .NET, so most likely recordset resources ...
    (microsoft.public.data.ado)
  • Re: OLE error 80040200 when assigning events of a TCustomADODatasetpointingto a multi-select stored
    ... all properties should be set on initial recordset before Open. ... recordsets will inherit properties. ... There should be no memory leaks because TADODataSet is not reference ...
    (borland.public.delphi.database.ado)
  • Re: is Nothing vs = Empty
    ... unclosed, to prevent memory leaks, as I've been advised. ... What about if the recordset is not Nothing but isn't open? ... paranoid coder pattern I see is more like this: ... On Error Goto Err_Handler ...
    (microsoft.public.access.formscoding)
  • is Nothing vs = Empty
    ... I want to put code in my routines to be sure that a recordset is never left ... unclosed, to prevent memory leaks, as I've been advised. ... But sometimes the recordset shows a value of "Empty" when I hover ... over it in the debugger, and in those cases the code is executed and I get ...
    (microsoft.public.access.formscoding)