Results 1 to 5 of 5
  1. #1
    masoud_sedighy is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    78

    ODBC sql server driver invalid object name "query name"


    i have a main query that it gets data form 2 other queries and inner join relation between these 2 other queries. when i am working in microsoft Access front-end and Access back-end i have no problem.

    now after migration tables to sql server i wanted to change this main query to pass-through query. after changing that to pass-through query i got error "sql server driver invalid object name query name".

    how i have to solve this problem. all the data for pass-through must come from tables? it does not work with other queries that before migration was working?

    please.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    does the query exist in SQL side?
    IS the query on the Access FE set to pass thru?

  3. #3
    masoud_sedighy is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    78
    My query is in Access front-end and it does not exit in sql. My query in Access front-end consists of 2 queries, i tried to set this main query and 2 others to pass thru but when i execute main query i got error invalid object name of queries inside the main query.

    I am thinking i have to make these queries inside ms sql as a view , but i do not know how to connect with views from access to sql server

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The source for pass through queries doesn't have to be a table, but it must come from someplace accessible to SQL Server. That could be a view, or several other tools in SQL Server. It can't be an Access query. You can link to a view in Access the same way you link to tables. You can rewrite your base query as a view, or create a stored procedure that does both, or a table valued function, or... The "best" solution depends on your situation and needs.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    Does one of the queries have spaces in the name? And don't forget that when using pass-through queries that it is the SQL server that does the parsing and T-SQL is different than Access SQL. So check the SQL syntax if it is valid T-SQL.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-12-2017, 04:29 PM
  2. Replies: 5
    Last Post: 06-26-2013, 02:29 PM
  3. Replies: 4
    Last Post: 06-24-2013, 07:12 AM
  4. "Invalid Database Object Reference"
    By jgelpi16 in forum Queries
    Replies: 4
    Last Post: 06-28-2011, 06:39 AM
  5. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 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