Re: Memory leak in ado



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"



.



Relevant Pages

  • Re: MDAC Converting Dataset to XML
    ... I hadn't realised there was a later version of MDAC than the one we had ... recordset is fine, the code that does this is a mirror of the conversion to ... XML and for completeness I include a copy (albeit ... Can you reproduce the symptom by saving the first piece of xml to a file, ...
    (microsoft.public.data.ado)
  • Re: Persisted XML files cannot be opened...
    ... which ships with MDAC to see if MDAC is not corrupted on this PC. ... > The first statement plucks an ADO recordset, stored as an XML fragment, ... The error message points to a problem in the ...
    (microsoft.public.vb.com)
  • Re: Persisted XML files cannot be opened...
    ... which ships with MDAC to see if MDAC is not corrupted on this PC. ... > The first statement plucks an ADO recordset, stored as an XML fragment, ... The error message points to a problem in the ...
    (microsoft.public.data.ado)
  • Re: Persisted XML files cannot be opened...
    ... which ships with MDAC to see if MDAC is not corrupted on this PC. ... > The first statement plucks an ADO recordset, stored as an XML fragment, ... The error message points to a problem in the ...
    (microsoft.public.vb.winapi)
  • Re: Persisted XML files cannot be opened...
    ... What I would suggest to do is to run ComponentChecker ... which ships with MDAC to see if MDAC is not corrupted on this PC. ... >> The first statement plucks an ADO recordset, stored as an XML fragment, ...
    (microsoft.public.vb.com)