Results 1 to 14 of 14
  1. #1
    Join Date
    Oct 2006
    Posts
    6

    Unanswered: Access 2003 - Not enough memory

    Hope somebody can help.
    I am working on an Access 2003 project and in one specific form I have quite a heavy portion of Visual Basic.

    When editing the code it happens quite often that the message "Not enough memory - Try to close ......" pops up when I am trying to save the form.

    Only way to get out of that situation is to kill Access in task manager = lost work .

    Task manager shows that only about 30 percent of ram memory (1.5 GB) is used.

    Whenever I closes the database in a normal manner a compacting is done.

    My Access is updated with SP3.

    Plenty of space on hard disk.

    I have browsed MS knowledge base which have quite a few references to the error messsage but none seems to cover my situation.

    I would very much appreciate any advise for a cure

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Boost your VM

    Boost you virtual memory up to min 500 and max to 1000
    See My comp -> Advanced -> 1st button on this tab -> Advanced -> change (button at bottem)

    See if you can up it by 500 each

    You'll have to restart after !
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

  3. #3
    Join Date
    Oct 2006
    Posts
    6
    Quote Originally Posted by Marvels
    Boost you virtual memory up to min 500 and max to 1000
    See My comp -> Advanced -> 1st button on this tab -> Advanced -> change (button at bottem)

    See if you can up it by 500 each

    You'll have to restart after !
    Thank's Marvels - the virtual memory is allready setted to 1536 MB ?

  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    up it some more

    If your ram is using 1500mb +
    and your ram is set to 1500

    seems to me you have to upgrade it some more
    got mine on 2000 and 3000

    if you got a lot mb's to spare, it doen't matter if you boost it.
    Incase you don't/never come to 1000mb VM, and it's set to 5000,
    that would be a waist, but in your case.

    Think i would even set it to 2500 and 3500

    PS whats the size of the MDB??
    see here why : http://office.microsoft.com/en-us/ac...307391033.aspx
    Last edited by Marvels; 02-27-08 at 07:06.
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

  5. #5
    Join Date
    Oct 2006
    Posts
    6
    Quote Originally Posted by Marvels
    If your ram is using 1500mb +
    and your ram is set to 1500

    seems to me you have to upgrade it some more
    got mine on 2000 and 3000

    if you got a lot mb's to spare, it doen't matter if you boost it.
    Incase you don't/never come to 1000mb VM, and it's set to 5000,
    that would be a waist, but in your case.

    Think i would even set it to 2500 and 3500

    PS whats the size of the MDB??
    see here why : http://office.microsoft.com/en-us/ac...307391033.aspx
    Thank's again Marvels.

    I have now setted for 2000/3000 - future surely will show if cured or not

    My database is only 12MB when compacted - during editing of Visual Basic I have observed to approx 100MB before compacting.

  6. #6
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question What

    Your db = 100mb
    compact 12mb

    and your ram grows up to 1,5 gb
    Do you have other things running that use that much resource

    Think you have to do an analysis on whats burning up your VM
    Thought you had a db of 1,5 GIG or something

    I'm Currently on vb.net and sqlserver +mysql
    few other systems and just come over 1 gig

    Are you running vista or XP ?
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

  7. #7
    Join Date
    Oct 2006
    Posts
    6
    Quote Originally Posted by Marvels
    Your db = 100mb
    compact 12mb

    and your ram grows up to 1,5 gb
    Do you have other things running that use that much resource

    Think you have to do an analysis on whats burning up your VM
    Thought you had a db of 1,5 GIG or something

    I'm Currently on vb.net and sqlserver +mysql
    few other systems and just come over 1 gig

    Are you running vista or XP ?
    XP prof.
    I am almost sure that the growth is related to Visual Basic editing - I will now cancel the automatic compacting when closing to see how the it grows.

    I have e few times checked the load on the RAM when the "No more memory ..." pops up - it has never been close to the limit - only about 30 percent load.

    So it is a bit strange.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    It may not be a RAM memory problem (virtual or physical). It may be a shortage of resources.

    some programs have memory leaks, which means that when they operate they 'loose' memory (effectively they are retaining/reserving the memory) even after they are closed. Its particularly a problem in graphics / image editing, especially in photo editing and manipulation.

    It can be a problem because objects aren't released or disposed of when finished with.. this can apply to Access as well with things like connections.

    It can be a problem if Access or any other application crashes.

    If it sis a memory leak then it can be difficult to track down the culprit(s).

    A reboot will (temporarily) clear this problem, rerunning the same software in the same manner will generally cause it to return.

    Obviously it is a problem with the length of time a PC is switched on.. the longer its on for, the more crippling any memory leaks become. Logging off may be sufficient to clear the system memory resources.., but if yoiu suspect memory leaks then do a reboot.

  9. #9
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Thumbs up Good point : healdem

    healdem is making a verry good point there.

    olejullarsen if in your code you have anny objects set
    see if there are set to nothing afterwords

    dim X as new clsClass 'same for objects ;forms

    'at the end of routine (if you dont need it anny more)do a

    if not (x is nothing )then set x = nothing
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

  10. #10
    Join Date
    Oct 2006
    Posts
    6
    Quote Originally Posted by Marvels
    healdem is making a verry good point there.

    olejullarsen if in your code you have anny objects set
    see if there are set to nothing afterwords

    dim X as new clsClass 'same for objects ;forms

    'at the end of routine (if you dont need it anny more)do a

    if not (x is nothing )then set x = nothing
    Hi Marvels.

    I think your note is on the track - I have quite a few instances of your example where i did not set it to "nothing" after use.
    I also believe that my problem is related to that issue because I do not recall I have observed the problem before I started to use objects etc.


    I will start the cleaning process and see if

  11. #11
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    One thing I try to do is re-use variables....ie..
    dim rs as adodb.recordset in one place and dim rs as adodb.recordset in another place....etc...etc...
    verses
    dim rs as adodb.recordset in one place,
    dim rx as adodb.recordset in another place,
    dim rm as adodb.recordset in another place, etc...etc...

    The same with variables like X or Y.

    If you open up task manager and watch the memory being used by the application, you'd be surprised the difference of an app growing which re-uses the same variables verses one which doesn't.

    Also make sure all recordsets are closed when done.
    Last edited by pkstormy; 02-28-08 at 23:20.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  12. #12
    Join Date
    Oct 2006
    Posts
    6
    Thank's Marvels, healdem and pkstormy for your advises.

    Browsing around I found a post in http://www.eggheadcafe.com/software/...y-to-perf.aspx about a report which did not work.

    The post advise to make an export of the malfuntioning object as text, make a new database, import all other objects and then import the malfunctioning object from the text file.

    I have a few times observed that something can make a form unuseable and the only cure is to make a new one.

    In my case I have have now tried to export my problem form as text, re imported it as text and it seems that this operation have cured my problem - at least I have not observed the 'Not enough memory..." error since.

    Can anybody confirm that the method is the standard cure for erraneous objects?

    Access also have its Compact/Repair facility - what is Repair reallly doing?

  13. #13
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    compact and repair..
    ...compresses the db, removing any redundant or duplicated objects that you have been working on (eg reports, forms etc that you have edited), ...compresses the data in tables, removing space used by deleted records (deleted records are flagged as deleted, rather than physcially removed from the db and space re-llocated),
    ...I think it rebuilds the tables making the space used more contiguous (a bit like defragment)
    ...repairs the indexes, rebalances the index trees so that they are not lopsided, making index access more even and reliable (in terms of time taken, reads to find the right record and so on).
    ...it also clears some internal settigns and flags, can sort out out of step errors (where the code says one thing, and the forms & reports say something else)
    ...apart form that nothing much!

    if that doesn't work then using a /decompile may be abel to help.. but decompile is to be used sparingly... compact & repair as often as required, decompile occasionally to fix those really mysterious bugs

    if you do hit porblems in can be quite a good idea to export all the objects into a new db.


    exporting the old problem object as text and reimporting is a new one on me.... glad to know it seems to have worked for you. As the saying goes...
    "you learn something new every day"
    or is it
    "when you stop learning, you start dying"

  14. #14
    Join Date
    Mar 2008
    Posts
    1
    I had this exact same problem yesterday and fixed it by deselecting the Automatic Name Correction option under Tools -> Options -> General (I work with the Dutch version, so these English words are a translation, but I'm sure you'll find it).

    This Automatic Name Correction is a big pain in the you-know-what, causing all kinds of very very strange problems, so get used to deselecting it always.

    Let me know if it worked for you!
    Keimpe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •