Results 1 to 2 of 2
  1. #1
    akshatagarwal93 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    14

    Importing to Back End DB

    Hi,



    I am quite new to databases in general but am reasonably proficient at using VBA in Access especially.

    I have been working on a DB prototype in which a user will collect some data into a text file and import it into the database on a daily basis. Currently, he clicks a button (Data Upload), he is then prompted to select the text files he wants to upload and then the data is imported into Access.
    The next morning, he will have to call the data back, export it into a text file and carry on working on the text file... and the process repeats.

    Currently I do this import by running a saved import; The user selects the file he wants and so I can get the filepath. I use this filepath to change the XML code of the saved import (see code below) and the import works fine. The saved import basically appends the data onto a pre-specified table called FAT Joint Table.

    Code:
    CurrentProject.ImportExportSpecifications(0).XML
    Now I want to develop the prototype further such that I have a front and back end split appropriately with data in the back and everything else in the front. I have been pondering though on how to import (and export) the data directly to (and from) the back end. I have been able to do this only by running a saved import in the back end from the front end. I do something similar to above in order to do this.

    Code:
        Dim BackEndPath As String
        Dim apAccess As New Access.Application    
        BackEndPath = Mid(CurrentDb.TableDefs("TurretDetails").Connect, 11)
        Debug.Print BackEndPath
        apAccess.OpenCurrentDatabase BackEndPath, True
        apAccess.Run "TestProc1"
    I wanted to find out if this is actually the best and fastest way to do this. I may upgrade to SQL Server if I can convince my boss so I'd want the code to be something similar to what I could do with SQL as the backend.
    I've not been able to find anything through Google Search etc so wanted to find out if what I am doing is the best method or whether there is an easier way. I've read some stuff about append queries and making temporary tables, link them then delete them but this seemed to be the easiest so I thought I'd try it first...

    Any help would be much appreciated!

    Thanks

    AA93

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Set table links in the FE to BE tables. Import and export with linked tables should work.

    Recommend UNC pathing for table links.

    Review http://forums.aspfree.com/microsoft-...ue-323364.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. I'm back!
    By evander in forum General Chat
    Replies: 3
    Last Post: 02-27-2013, 08:29 PM
  2. Replies: 4
    Last Post: 05-21-2012, 08:21 AM
  3. Back to the beginning - again
    By Sorbz62 in forum Database Design
    Replies: 4
    Last Post: 02-19-2012, 08:39 AM
  4. back end path
    By Mclaren in forum Programming
    Replies: 1
    Last Post: 06-08-2011, 01:13 PM
  5. Lock back-end DB with VBA
    By somm in forum Programming
    Replies: 5
    Last Post: 12-31-2010, 01:38 AM

Tags for this Thread

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