ODBC - Call Failed

KPLewisBPM
Member Posts: 12
In MS Access I linked 2 tables from Navision Attain 310A that hold similar data.
I then created a query for each linked table to show only the fields relevant. I then created a UNION SQL statement.
When running the SQL statement
SELECT No_,Description,Quantity FROM [Order Details]
UNION
SELECT No_,Description,Quantity FROM [Finished Order Details]
Error Message: ODBC-Call Failed [Navision Software a/s][Navision Attain ODBC Driver]Expected lexical element not found:-,keyword.(#1015)
However running just the SELECT statement lines seperately works fine.
Any ideas would be greatly appreciated
Regards
KPLewisBPM
I then created a query for each linked table to show only the fields relevant. I then created a UNION SQL statement.
When running the SQL statement
SELECT No_,Description,Quantity FROM [Order Details]
UNION
SELECT No_,Description,Quantity FROM [Finished Order Details]
Error Message: ODBC-Call Failed [Navision Software a/s][Navision Attain ODBC Driver]Expected lexical element not found:-,keyword.(#1015)
However running just the SELECT statement lines seperately works fine.
Any ideas would be greatly appreciated
Regards
KPLewisBPM
0
Comments
-
I am not certain how you did it in Access, but if I open a ODBC connection using the keyword "union" that does not work.
See the ODBC documenten. It uses the "," such as
SELECT t1.Field1,t1.field2,t2.field1 FROM Table1 t1,Table2 t2 WHERE t1.id1 = t2.id1
Success0 -
There is no data stored in access, I am using Linked table manager.
I have 2 table links.
When I query each table using a select statement, ODBC kicks in and goes to Navision for the information. However if i create a query that calls for data from 2 tables that is when I get the error.
The records have identical data and i need the query to bring back all records from both tables.0 -
I have the Dutch version and could not find this program (how is it translated?) But I tried it via "Query Wizard" (translated). It works!
I use Access 2000 and NF 3.60. Perhaps that is the problem?
Other solution could be to make a small program in VBA and import that all in a real table in Access0 -
Linked table manager is part of MS Access it enables you to create a link to an external table.
Running a query against one linked table works fine. but to return all the records from 2 tables into 1 query is the problem.
I need to look up information based on a production order number. however when the prod order is finished it dissappears from one table and is inserted into another (Within Navision). But I need to find information for all orders, hence the reason i need all records in one query.
Kind Regards0 -
Yes, I have done it the wright way.
Is the problem solved if you update your NF (to for example 3.60) (on a test machine)?0 -
Do you mean the Client or Server Software?
The problem i have is we cannot change our software, our database is bespoke to our entire organisation. all companies have to run 310A at present.
One of the reasons I am trying to get information collated in Access is I am finding so many Keys and links missing in navision,creating reports is almost immpossible.0 -
Both.
Just copy the database files on a test machine. Perhaps disconnect this PC from your netwerk. Install the server and client software. Start the database, start a client and if he ask you to convert say "yes". You have a newer version to play with.
If that is no option then you have make something nice in Access0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions