Results 1 to 4 of 4
  1. #1
    LuboG is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    3

    UPDATE query using INNER JOIN across multiple databases

    I have trouble with this query:

    UPDATE Table1 IN '' ';Database=C:\datanew.mdb;PWD=xyz' AS T1
    INNER JOIN Table2


    ON T1.ID=Table2.ID
    SET T1.Field1=Table2.Field2
    WHERE Table2.Field3='something'

    I have this error message ,,Syntax error in UPDATE statement,,.
    Can you anybody tell me what is wrong?

    Thanks for your help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Never seen that syntax. Where did you find it? Your db sits at the C: root? I found a reference that shows this syntax for referencing the external db http://www.tek-tips.com/viewthread.cfm?qid=1223940:

    [;Database=C:\datanew.mdb;PWD=xyz].Table1 AS T1
    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
    LuboG is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    3
    Thanks Super Moderator,

    I don't use root directory for my database, it was only simple sample.
    My syntax SELECT * FROM Table1 IN '' ';Database=C:\datanew.mdb;PWD=xyz'
    working corectly my c++ Builder ADO component and in MS Access 2010.
    Your synatax SELECT * FROM [;Database=C:\datanew.mdb;PWD=xyz].Table1
    working corectly only in MS Access 2010 but in C++ Builder 6 or RAD studio XE3
    i have this error:
    ,,Parameter object is improperly defined. Inconsistent or Incomplete information was provided.,,

    World is too complicated...

  4. #4
    LuboG is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    3
    ...it's corect solution with quotes for all (C++ Builder and Access 2010)

    UPDATE
    [';Database=C:\data.mdb;PWD=xyz'].Table1 AS T1 ...

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

Similar Threads

  1. Query several databases to UPDATE one
    By Kelrizzo in forum Queries
    Replies: 4
    Last Post: 10-27-2011, 10:26 AM
  2. Replies: 3
    Last Post: 09-07-2011, 03:17 PM
  3. Replies: 3
    Last Post: 12-20-2010, 09:22 AM
  4. append query for multiple databases
    By vasto in forum Access
    Replies: 0
    Last Post: 09-24-2009, 08:34 AM
  5. VBA SQL Query of Multiple Databases
    By VBA_Rookie in forum Programming
    Replies: 0
    Last Post: 12-02-2008, 12:32 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