Solved

Reducing ram usage

Posted on 2000-04-28
4
293 Views
Last Modified: 2010-05-02
I have a VB app that because of the amount of work it has to do takes a very large percentage of the server's ram which practically brings the server to a halt.  Is there any tricks to reduce ram usage in VB.  Any help would be great!  Thanks!
0
Comment
Question by:vgru
4 Comments
 
LVL 18

Expert Comment

by:deighton
ID: 2758856
depends on the code you've got so far/what the program does.

 Avoiding variants where a type like integer can be used is a good one.  

Avoid large arrays of public variables etc.
0
 
LVL 1

Expert Comment

by:4P
ID: 2758947
I agree with Deighton on avoiding public variables and arrays.

I just wanted to note that it's a good practice to free up everything you don't need anymore. I mean objects, escpecially large automation objects and also recordsets.

It would be helpful to know what kind of tasks your program does.
0
 
LVL 1

Accepted Solution

by:
jgravelle earned 20 total points
ID: 2759233
I would also agree with the previous suggestion as well you may want to use light weight controls where possible. Use an Image box instead of a Picture Box, Labels instead of textboxes if you just need to display values on the screen, avoid using a bunch of different fonts on your forms. And like the last comment said always always release any objects you have set by setting them to nothing.
0
 

Author Comment

by:vgru
ID: 2759253
Thanks!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question