Results 1 to 4 of 4
  1. #1
    JonMulder is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    24

    Import Tables Directly to Back End Database

    Greetings,



    I've searched through the forums and haven't seen a definite "NO" to what I want to do.

    I'd like to to import some large oracle tables from a remote server using "DoCmd.TransferDatabase..." on a daily basis. Currently, the system works, but my database is getting quite large (800 Mb) and I'd like to split off the tables to a back end database.

    Is there a way to import directly to the back end database? The postings that I've seen seem to imply that one must first import the tables into my front end, then export them into the back end. Does that sound correct?

    I'm at home right now, but will give it a try when I get to work. It just seems like there's got to be a more direct way!

    Jon Mulder
    Department of Water Resources
    Red Bluff, CA

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You need to import new tables daily, not just the records into existing tables?

    Might be able to use SELECT INTO sql action. The basic syntax is:

    SELECT * INTO table IN path/database FROM table;

    The question is if the FROM clause can reference another external data source. Indications are it is possible:
    http://forums.databasejournal.com/sh...rom-another-db
    http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=72331
    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.

  3. #3
    JonMulder is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    24
    June7,

    Thanks for the reply! I've been muddling through this for the past day. Here's what I want to do.

    Create Back End database of tables (do this only once).

    Refresh the Back End Tables on a regular (daily or every few days).

    In searching the forums some more, I came across a post about copying tables from DatabaseA (Oracle tables on a remote server) into DatabaseB(my Back End tables on a local server with VBA code in DatabaseC (my Front End application).

    So I tried the following:
    Sub TryAgainGetCASGEMTable(strODBCConnect, strTableName)
    Dim strBackEndDatabase As String
    strBackEndDatabase = GetDBPath() & Left(CurrentProject.Name, Len(CurrentProject.Name) - 18) & "_Tables.accdb"
    Dim dbsBackEndDatabase As Database
    Set dbsBackEndDatabase = OpenDatabase(strBackEndDatabase)
    DoCmd.TransferDatabase acImport, "ODBC", strODBCConnect, acTable, strTableName, strTableName, False
    dbsBackEndDatabase.Close
    Set dbsBackEndDatabase = Nothing
    End Sub


    That procedure opens up my Back End Database and DOES copy tables over from the Oracle server, so that part works.

    BUT, when I look at my tables in my Front End, they are no longer "linked", but actually in the Front End.

    QUESTION: Is there something more I need to do to tell my Front End that the tables are linked and not imported?

    Thanks for any help you can provide!

    Jon Mulder
    Engineering Geologist
    Red Bluff, California

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I don't see the backend path referenced in the TransferDatabase arguments. Just opening db as an object in VBA doesn't mean it will automatically be targeted.

    Review this recent thread with similar issue
    https://www.accessforums.net/program...ext-33247.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. Replies: 4
    Last Post: 12-05-2012, 03:24 PM
  2. Query not working with Directly pasted Tables
    By GAccess in forum Queries
    Replies: 3
    Last Post: 06-25-2012, 09:29 AM
  3. Split db Import tbl into the back end
    By webisti in forum Access
    Replies: 5
    Last Post: 05-31-2012, 01:57 AM
  4. Replies: 4
    Last Post: 05-21-2012, 08:21 AM
  5. Access database won't open directly
    By Rale in forum Access
    Replies: 0
    Last Post: 03-24-2011, 03:33 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