Results 1 to 10 of 10
  1. #1
    Danny20 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    5

    the database crashes

    I have a table with the following values.


    Number machine step
    1 E1 10
    1 E2 20
    1 E3 30
    2 E1 10
    2 E4 20
    2 E6 30
    2 E5 40


    In a new table I want to see it as follows


    Number Sequence machine
    1 E1-E2-E3
    2 E1-E4-E6-E5


    VBA can do this but the problem is that we are talking about 300000 records or more and if the code runs then the database freezes because it is more than 2Gig.
    the records come from source table, but is created in a query to sort by number and step
    Afterwards I use VBA to read and compare record by record and so I write in a field E1-E2 etc.....
    but then I see the file increase

    Is there a solution to this problem or can this be done via a query?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Make the result table In It's own database.
    Link it into your main db to keep the size down.
    compact the main db before you start.

  3. #3
    Danny20 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    5
    The result is in it's own database
    the compact is always done.

  4. #4
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255

    Risposta

    In the attached example I have reproduced the scenario you proposed of 300000 records to be processed but the query is executed correctly in a few seconds.
    Test.zip

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Freezing (your post) and crashing (your post title) are 2 different things. Which is it?
    If your db is really hovering around 2GB then you have no room left for overhead, in which case I can understand any query causing a problem. If that is the case, either you will have to separate tables into several back ends and link them, or you have outgrown Access and need a version of sql server to hold your data.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Danny20 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    5
    Quote Originally Posted by CarlettoFed View Post
    In the attached example I have reproduced the scenario you proposed of 300000 records to be processed but the query is executed correctly in a few seconds.
    Test.zip
    Perfect, I didn't know vba could be in a query, now I did the same but over the entire query instead of selected particles.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I would have used Allen Browne's Concat function?

    http://allenbrowne.com/func-concat.html

  8. #8
    Danny20 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    5
    It is working , but the query go fast. But now I want to make a table from the query with statement Create table. This is not working ? solution?

    her the link to my data : https://wetransfer.com/downloads/ae8fbd3e53dcd08545d63a85c601554820201130163259/236b36efe47544aec327911d1dabda7220201130163334/737e47

  9. #9
    Danny20 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    5
    The query go fast , but if I want to make a statement Create table the query hangs.

    here is my data https://wetransfer.com/downloads/ae8fbd3e53dcd08545d63a85c601554820201130163259/236b36efe47544aec327911d1dabda7220201130163334/737e47

    solution? or a bug in access? a insert query the same problem
    Last edited by Danny20; 12-01-2020 at 05:54 AM.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Post 8 was moderated, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. App crashes when I copy the database
    By Paul H in forum Access
    Replies: 3
    Last Post: 02-20-2020, 10:52 AM
  2. Replies: 5
    Last Post: 12-15-2015, 04:01 PM
  3. Blank Password Text Box Crashes Database
    By KpAtch3s in forum Programming
    Replies: 6
    Last Post: 09-02-2015, 09:07 AM
  4. Replies: 4
    Last Post: 05-14-2013, 08:51 PM
  5. Database crashes after table update
    By AccessJunkie in forum Access
    Replies: 3
    Last Post: 09-09-2011, 07:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums