Re: Memory leak in ado



That was the extent of the help I could offer. Sorry.
I'm not clear why the recordset needs to stay open continuously. Why not
persist it to disc and reopen it as necessary?

Zaza Turmanidze wrote:
Hi Bob,
1. My recordset must be keep open because end-user must delete and
add some parts of current recordset.
2. I tried my code in MDAC 2.8 and this problem still active

Any help would be appreciated.

"Bob Barrows [MVP]" wrote:

Zaza Turmanidze wrote:
Hi,
I'm using ADO 2.7 and have memory leak when I try several times add
and delete records. See code (VB6)

Dim RS As ADODB.Recordset
Private Sub Main()
Dim counter As Long
Set RS = New ADODB.Recordset
RS.Fields.Append "Name", adVarChar, 255
RS.Open , , , adLockOptimistic

For counter = 1 To 100
Add_Records
Delete_Records
Next
MsgBox "Complete"
End Sub


The only issue I can see is that you never close the recordset.
Try upgrading to MDAC 2.8.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: ERROR with command text
    ... I'm not sure why you would think I would hate it. ... unnecessary recordset object when your run a query that returns no records ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: Median calculation
    ... Already answered in another newsgroup to which you posted the same question. ... Dim rs As DAO.Recordset ... 'Open a recordset on the table. ... DMedian = rs ...
    (microsoft.public.access.queries)
  • Re: Access sending data to Word VBA Userform
    ... To get assistance on that, it would be best to ask in an Access newsgroup, ... Doug Robbins - Word MVP ... Dim rs As DAO.Recordset ... ' Set the number of Columns = number of Fields in recordset ...
    (microsoft.public.word.vba.userforms)
  • Re: Binding Data to Forms, Textboxes etc.
    ... I intended to post this to the .net forms newsgroup, and yes I may be mixing ... > Windows applications are a very different animal to Access forms. ... The terms 'Row Source' and 'Recordset' are not used ... >> "A bound form means that you have identified a Row Source for your form. ...
    (microsoft.public.access.formscoding)
  • Re: Paging disconnected recordset
    ... referencing fields that do not exist in the recordset. ... Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)