web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Access query on ODBC linked table (Group By" causes "ODBC--Call Failed" error)

(0) ShareShare
ReportReport
Posted on by 90

Dear all,

I hope you can help me with this matter. I created an Access 2010 database with a linked table using ODBC. When I run a query on this table using the group by parameter I get an error. I changed the query in a pass trough query, but this resolves in the same error. The goal is to summize the amounts on the customer table (Table: Detailed Cust_Ledg_ Entry) in Nav 2009.

With kind regards,

Roger

"

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Roberto Stefanetti Profile Picture
    12,998 on at
    RE: Access query on ODBC linked table (Group By" causes "ODBC--Call Failed" error)

    hi,

    only a suggestion

    if you are using NAV 2009 on SQL Server, try to create Sql Views with sum & group by on SQL Server and after link the View in Access with ODBC.

    Great posts about this issue here:

    sl-dynamics.blogspot.it/.../creating-sql-server-views-to-show.html

  • RogerH72 Profile Picture
    5 on at
    RE: Access query on ODBC linked table (Group By" causes "ODBC--Call Failed" error)

    Hi Roberto,

    Thanks for the suggestion. Can you be a little more specific, for instance how to create this view? The post doesn't provide an answer so it seems.

    Roger

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: Access query on ODBC linked table (Group By" causes "ODBC--Call Failed" error)

    hi,

    this seems to be an error with the odbc driver.

    1. option:

    create the neded view in the sql server. to do that right click on the views item (under database name) and select new view. you can create a view by writing the sql code or using a graphical designer. maybe your choice.

    be sure to write a correct sql statement. try it in a sql command window before creating the sql view.

    sample:

    SELECT Shippers.ShipperName, Employees.LastName,

    COUNT(Orders.OrderID) AS NumberOfOrders

    FROM ((Orders

    INNER JOIN Shippers

    ON Orders.ShipperID=Shippers.ShipperID)

    INNER JOIN Employees

    ON Orders.EmployeeID=Employees.EmployeeID)

    GROUP BY ShipperName,LastName;

    as you can see: ShipperName AND LastName are part of the group by clause.

    that means: if you use a group by clause nearly every field name must be part of the group by clause except the aggregate entries.

    2. option:

    why not try to create the needed query using a nav query?

    best regards

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans