Results 1 to 2 of 2
  1. #1
    asearle is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Posts
    24

    ODBC with Oracle

    Hi Everyone,



    I have a number of ODBC passthrough queries which collect data from an Oracle database. This all works fine.

    I also have some VBA code which can generate some of these queries 'on the fly' (e.g. passing filter parameters). This also works fine when I avoid using table synonyms.

    However, when I programmatically generate a query and try to use a table synonym such as SELECT * FROM T_LOG LOG MSAccess adds the word "AS" and produces the following: SELECT ' FROM T_LOG AS LOG ... which falls over because Oracle does recognise the "AS". If I then manually remove the "AS", the query works fine.

    This is a stupid problem which is driving me round the bend so my question is how to stop MS-Access poking its nose in and adding those "AS" entries?

    I really hope somone can help me.

    Regards,
    Alan Searle

    Cologne, Germany

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    T_LOG LOG is a table name? Names with spaces, special characters, punctuation (underscore is exception) need to be enclosed in []. Also names that are reserved words (line Date). This is the case for tables, queries, reports, controls, fields. I have never seen Access throw in the 'AS' and am surprised the query will even run after you remove it.
    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. Oracle to MSACCESS
    By karankukreja in forum Access
    Replies: 1
    Last Post: 03-24-2011, 08:20 AM
  2. Oracle LAG Equivalent
    By OzzyMiner in forum Queries
    Replies: 2
    Last Post: 03-10-2011, 11:41 AM
  3. Oracle ODBC Problems
    By dhall@vermeer.com in forum Access
    Replies: 1
    Last Post: 09-08-2010, 10:01 AM
  4. Replies: 5
    Last Post: 06-24-2010, 08:00 AM
  5. ODBC -- call failed. | Oracle ODBC
    By drdexter33 in forum Access
    Replies: 1
    Last Post: 04-03-2010, 09:32 PM

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