PLEASE HELP! MFC CRecordSet.Requery is eating my memory!

From: ASmith798 <asmith798_at_aol.com>
Date: 1997/02/23
Message-ID: <19970223232100.SAA02930_at_ladder02.news.aol.com>#1/1


An order entry databse app, built with VC++ 4.0 and MFC, uses the MFC classes of CDatabase, CRecordSet, CRecordView... ODBC connection via the Visigenic Oracle driver that came with VC++ (VSORAC32) talking to Oracle 7.2 server running on NT 3.51. Client app running on Win 95, Pentium 100, 32 Mg Ram.
16 Oracle tables are utilized thrughout the app. TCP/IP is the com protocol - using SQL*Net 2

Most of the time the CRecordsets are 'Requeried' by changing the values of declared parameters as per the recommendations of the documentation. However, at times, the need arises to alter the m_strFilter member from it's usual format of something like "VAR = ?" to something like "VAR LIKE ?" or even using concatenation to get something like "VAR = '1234'" The value of m_strFilter can get quite complex when querying in response to a 'Find' function from a partially filled out form. As soon as the m_strFilter is altered and the Recordset is requeried, the allocated memory fails to 'deallocate' after the Requery and every Requery thereafter builds and builds the allocated memory until the size of the swapfile equals the available disk space and a crash follows, usually after an illegal page fault.

According to the documentaion this should be legal procedure for filtering the return of a Requery call, although the documentaion suggests that it may not Requery as efficiently as simply using the parameters and an unchanging m_strFilter.

Any and all suggestions will be appreciated!!! If anyone wants to tackle this and needs further info, just let me know!

thanx,
Arlyn Smith - ASmith798_at_aol.com Received on Sun Feb 23 1997 - 00:00:00 CET

Original text of this message