Results 1 to 3 of 3
  1. #1
    RJ Heffer is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2020
    Location
    Minnesota
    Posts
    1

    Access database 2GB size limit; break up into smaller databases?


    Over a number of years I have built a database in Access 2007 In tabular form it has 713 rows, it contains text and some associated jpg image files. Recently I have had problems with corruption of the database and I realized that it had reached 2GB in size. I suspect that he corruption problems were arising because the database had reached its size imit. To solve this problem I would like to break the database up into several smaller databases. So far I have not been able to accomplish this. I would appreciate any suggestions.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    i keep all jpg out of the db. I store the path to it: \\server\folder\jpgs\img1.jpg

    then open it using OpenNativeApp:

    Paste this code into a module, and it will open ANY file in its native application.
    usage: OpenNativeApp "c:\folder\file.pdf"
    will open it in acrobat
    and
    OpenNativeApp "c:\folder"
    will open the folder


    Code:
    'Attribute VB_Name = "modNativeApp"
    'Option Compare Database
    Option Explicit
    Code:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As Long
    Private Declare Function GetDesktopWindow Lib "user32" () As Long
    Const SW_SHOWNORMAL = 1
    Const SE_ERR_FNF = 2&
    Const SE_ERR_PNF = 3&
    Const SE_ERR_ACCESSDENIED = 5&
    Const SE_ERR_OOM = 8&
    Const SE_ERR_DLLNOTFOUND = 32&
    Const SE_ERR_SHARE = 26&
    Const SE_ERR_ASSOCINCOMPLETE = 27&
    Const SE_ERR_DDETIMEOUT = 28&
    Const SE_ERR_DDEFAIL = 29&
    Const SE_ERR_DDEBUSY = 30&
    Const SE_ERR_NOASSOC = 31&
    Const ERROR_BAD_FORMAT = 11&
    
    Public Sub OpenNativeApp(ByVal psDocName As String)
    Dim r As Long, msg As String
    r = StartDoc(psDocName)
    If r <= 32 Then
        'There was an error
        Select Case r
            Case SE_ERR_FNF
                msg = "File not found"
            Case SE_ERR_PNF
                msg = "Path not found"
            Case SE_ERR_ACCESSDENIED
                msg = "Access denied"
            Case SE_ERR_OOM
                msg = "Out of memory"
            Case SE_ERR_DLLNOTFOUND
                msg = "DLL not found"
            Case SE_ERR_SHARE
                msg = "A sharing violation occurred"
            Case SE_ERR_ASSOCINCOMPLETE
                msg = "Incomplete or invalid file association"
            Case SE_ERR_DDETIMEOUT
                msg = "DDE Time out"
            Case SE_ERR_DDEFAIL
                msg = "DDE transaction failed"
            Case SE_ERR_DDEBUSY
                msg = "DDE busy"
            Case SE_ERR_NOASSOC
                msg = "No association for file extension"
            Case ERROR_BAD_FORMAT
                msg = "Invalid EXE file or error in EXE image"
            Case Else
                msg = "Unknown error"
        End Select
    '    MsgBox msg
    End If
    End Sub
    
    
    this website keep breaking the code in two. Its 1 module.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    I agree that the issues is you're storing objects in Access tables. Splitting up into several db's just means that you've got multiple instances of the same problem. If you get the objects into folders as suggested you then remove the objects from your tables. If your db is still quite large at that point, you might have objects stored in a system table as well and will need to remove those but you can post back about that.

    You want to do any of this on a copy of your db at first, if possible.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 12
    Last Post: 10-21-2018, 05:49 PM
  2. break a string into smaller bits
    By jmss96 in forum Queries
    Replies: 3
    Last Post: 12-18-2014, 11:57 AM
  3. size of databases in Access 2010
    By AzizSader in forum Forms
    Replies: 3
    Last Post: 11-19-2013, 11:41 AM
  4. Replies: 3
    Last Post: 09-07-2011, 03:17 PM
  5. File size smaller after saving
    By Pilotwings_64 in forum Access
    Replies: 1
    Last Post: 08-20-2010, 06:21 AM

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