Visual Basic 4 Out of Memory Issues
I am running two seperate executable files generated from VB4 code. The applications work on machines running win 2000 and xp. I have not tested on NT or server 2000. The applications will not run on Server 2003 or XP for Tablet PC 2005- the only other two OS's that I have access to.
I am running two seperate executable files generated from VB4 code. The applications work on machines running win 2000 and xp. I have not tested on NT or server 2000. The applications will not run on Server 2003 or XP for Tablet PC 2005- the only other two OS's that I have access to.
The errors I get are common to both applications on both OS's on which the applications will not run.
The error messages:
1) "Out of Memory" followed by "Run time error 91: Object Variable or With Block not set.' On debug the line 'Data1.Recordset.Index = SORT$' is indicated as the problem.
2) "Out of Memory" followed by "Run time error 2004: Out of Memory.' On debug the line 'Data1.Refresh' is indicated as the problem.
I get the out of memory error once for each time a connection to a databse is made. E.g. at one point a connection is made to 6 seperate databases. I get 6 memory errors followed by the run time error.
I am uncertain as to whether this is an OS issue, a data control issue, a case of horrible programming by the original programmer issue or something else.
I also get an out of memory error when trying to add a data control to a form. Properties for 'Connect' and 'Database Name' are 'Access' and ' settings.mdb' (shouldn't be an issue). 'Recordset Type = Dynaset'. When I try to set the recordsource property I get the 'Out of Memory' Error.
(I have had issues with this code and incorrect use of the 'option explicit' selection- I have no idea if this might also be causing some problems.)
Any light that you can shed is greatly appreciated- even if it's just to point me in the right direction to research my own answers!
The errors I get are common to both applications on both OS's on which the applications will not run.
The error messages:
1) "Out of Memory" followed by "Run time error 91: Object Variable or With Block not set.' On debug the line 'Data1.Recordset.Index = SORT$' is indicated as the problem.
2) "Out of Memory" followed by "Run time error 2004: Out of Memory.' On debug the line 'Data1.Refresh' is indicated as the problem.
I get the out of memory error once for each time a connection to a databse is made. E.g. at one point a connection is made to 6 seperate databases. I get 6 memory errors followed by the run time error.
I am uncertain as to whether this is an OS issue, a data control issue, a case of horrible programming by the original programmer issue or something else.
I also get an out of memory error when trying to add a data control to a form. Properties for 'Connect' and 'Database Name' are 'Access' and ' settings.mdb' (shouldn't be an issue). 'Recordset Type = Dynaset'. When I try to set the recordsource property I get the 'Out of Memory' Error.
(I have had issues with this code and incorrect use of the 'option explicit' selection- I have no idea if this might also be causing some problems.)
Any light that you can shed is greatly appreciated- even if it's just to point me in the right direction to research my own answers!
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
I agree I think VB6 is probably the way to go. You shouldn't have to change your code much. It may still be a programming issue, but VB6 might be more explanatory as to what you did wrong whilst coding. I have to assume you're using the Win32 version of your program? You didn't specify and VB4 is 16 or 32 bit. If you aren't already running a 32 bit version I'd make that the first change.
I have to assume VB4 is service packed and has all available updates? Also the runtimes on the system are the most recent available for vb4?