Results 1 to 5 of 5
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Linking databases - Problem moving table

    I created a database which now is pushing the 2G limit. I did some reading and thought moving the table containing documents (large) to a new database and then linking the two would solve my problem.



    I open a new database and then attempt to important the documents table from the other database. Access begins the process but about 1/2 through tells me it is "not responding" and shuts down to restart the program. So what I am wondering is:

    1. Is there another way to copy this large table to another database OR
    2. Should I maybe leave it where it is and copy the other smaller tables into a new database and then link?

    Thanks in advance.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try #2 and see if it helps.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    i usu take out the largest table and put it in its own db.
    1. i do NOT store documents in the db....its a space hog. Instead I store the path to the document on the network: \server\folder\mydoc.docx

    using the code below , I click a button to open the said document.

    paste this code into a module. Then it will open ANY file via its extension....
    .pdf files will open in acrobat,
    .doc files in word
    etc

    USAGE:
    OpenNativeApp "c:\folder\file.xls"
    'opens in excel
    or
    OpenNativeApp field
    'opens item in field in native app

    Code:
    Option Compare Database
    Option Explicit
    
    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
    
    
    Private Function StartDoc(psDocName As String) As Long
    Dim Scr_hDC As Long
    
    
    Scr_hDC = GetDesktopWindow()
    StartDoc = ShellExecute(Scr_hDC, "Open", psDocName, "", "C:\", SW_SHOWNORMAL)
    End Function

  4. #4
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    While waiting, I was able to get the one table copied. Of course, this seems to have revealed another problem. The database created with the documents alone is very large by itself about 1.7 GB.

    I am also thinking that another approach to the size problem would be if there was another way for Access to be able to get to them w/o actually having them in the database. I have 660 individuals, all of whom have documents in their file, all of which are in PDF format. Can I put them "somewhere" that Access can just go to retrieve when they are needed?

  5. #5
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Just saw this. Pretty much a novice and not sure I know how to "insert" all of this but I will give it a try. Thanks.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-29-2013, 01:19 PM
  2. Moving Access Objects Between Databases
    By ROCKET01 in forum Security
    Replies: 2
    Last Post: 01-28-2013, 04:53 PM
  3. Need help with linking databases
    By matt1121 in forum Access
    Replies: 2
    Last Post: 01-11-2013, 10:56 AM
  4. moving tables between databases
    By TheShabz in forum Programming
    Replies: 4
    Last Post: 11-15-2010, 05:54 PM
  5. Moving Records Between Databases
    By sscott in forum Access
    Replies: 2
    Last Post: 03-22-2009, 09:08 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