DoCmd.TransferDatabase acImport using ODBC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • albertob
    New Member
    • Jul 2013
    • 1

    #1

    DoCmd.TransferDatabase acImport using ODBC

    Hello!

    I have the following problem. I'm trying to use an ODBC connection to import one table from an ORACLE database to my access database.

    Manually, trough access command panel database ODBC, I can do it very easily. I use the following information

    Oracle OBDC Drive Connect
    Machine Data Source: TYPE_FAN
    Service Name: RATIO001
    User Name: MACKTTP1
    Password: syygyat
    Access Database Name: NURNMM.accdb
    Source Table Name: MAINDATA_UPDATE
    Destination Table Name: MAINDATA_UPDATE _TARG

    When I try to use the following command I'm always have an error.

    DoCmd.TransferD atabase acImport, "ODBC Database", _
    "ODBC;DSN=RATIO 001;UID=RATIO00 1;PWD=syygyat;L ANGUAGE=us_engl ish;" _
    & "DATABASE=NURNM M.accdb", acTable, "MAINDATA_UPDAT E", "MAINDATA_UPDAT E_TARG", False, True

    Can some one help me?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    What is the error message?

    This looks like VBA code. Is it VBA or ASP? Let us know so we can move it to the right forum.

    Comment

    Working...