Hello All

My program receives the messages from some hardware and store data in the database (i.e.this work in very high speed). In the Windows Task Manager I see that size of my program in the memory grows consistently. This memory never bacK! The line in my
code, causing the memory leaks, is a call to Execute method of Connection object:

Private m_Connect As ADODB.Connection


Dim sQuery As String
sQuery = "INSERT INTO ..."

The Execute method retrieves the Recordset object, so my first attempt the solve this issue was to receive this Recordset and close it:

Dim rsResult As ADODB.Recordset
Set rsResult = m_Connect.Execute(sQuery)

If (Not (rsResult Is Nothing)) Then

If (rsResult.State = ADODB.adStateOpen) Then


End If

Set rsResult = Nothing

End If

but I still observe the memory leaks.

Second attempt was to tell to Connection object don't produce the Recordset:

m_Connect.Execute(sQuery, , ADODB.adExecuteNoRecords)

but this also didn't help me.

If I comment this line then the program stay on the same size in memory.

I test this problem with both "Microsoft OLE DB Provider for ODBC Drivers" and "Microsoft Jet 4.0 OLE DB Provider" providers.

Please help me to solve this problem. All sensible ideas will accepted with great thanks.

I use:

Windows 2000 Pro + SP3
Visual Basic 6.0 + SP5
ADO 2.7 Refresh (but 2.6 also produce same bug)
Access 2000

Best regards
Boris Melnikov