The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

VB6 Leaking

I recently switched from DAO to ADO, and wrote a small application in vb6 for a client. Througout, I used code like

dim rs as adodb.recordset
set rs = ....

etc. It worked fine within the IDE. I then made my final exe. it worked fine, but on exiting, it showed an error message:

'Instruction at xxxxx tried to reference memory at yyyyy. the memory could not be 'read'.

I tried it then on a win 98 machine and it worked fine, without the error. The problem is only on Win 2000 and up.

This seems a silly problem, I'm ashamed to bother you guys. But when I read joel saying the MSDN camp was taking over Redmont and preventing backward compatibility, I thought I might as well post this problem here.

Am I making a mistake in my code, or is there a compatibility problem?
Ramesh Natarajan Send private email
Wednesday, November 09, 2005
 
 
Try calling:

Set rs = Nothing

before rs goes out of scope.

Also install the latest MDAC and Jet libraries.

ADO tends to leak memory. It can be a real problem for servers. You need to shut down the appication from time to time to reclaim memory.
MBJ Send private email
Wednesday, November 09, 2005
 
 
"but on exiting, it showed an error message"
That tends not to be caused by memory leak. Do you use any 3rd party controls in the application?
Wills
Wednesday, November 09, 2005
 
 
" Try calling:

Set rs = Nothing"

Also do a rs.close()

and set the connection itself = nothing.
Phil Send private email
Thursday, November 10, 2005
 
 
Definitely get the latest MDAC update. Some versions of ADO are quite buggy.
DJ
Thursday, November 10, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz