ODBC Driver generating errors

threefromzero
Member Posts: 5
I'm connecting to our Navision db through ASP to create a web portal for our warehouse. My code worked perfectly on our navision test server but when trying to interact with the live server I'm hitting some issues.
Trying to execute this sql statement gives a "Microsoft Business Solutions-Navision ODBC Driver]Column not found: No." error. However, the field "No." is very definitely in the sales header table. Any ideas? Again, this code worked perfectly when run with the test server but as soon as I switched the DSN to point to the live server I started getting this error.
strUpdate = "UPDATE " & chr(34) & "Sales Header" & chr(34) & " SET stagedstatus='STAGED " & month(now) & "/" & day(now) & "/" & right((year(now)), 2) & "' WHERE " & chr(34) & "No." & chr(34) & "='SO11915'"
Trying to execute this sql statement gives a "Microsoft Business Solutions-Navision ODBC Driver]Column not found: No." error. However, the field "No." is very definitely in the sales header table. Any ideas? Again, this code worked perfectly when run with the test server but as soon as I switched the DSN to point to the live server I started getting this error.
0
Comments
-
threefromzero wrote:"' WHERE "
not that this is my specialty but is the extra quote mark just a typing error on this site or did you copy & paste?0 -
That's actually not an error - it is the closing ' character after the date text. That statement is a little confusing because I'm using chr(34) to generate double quotes around my field names which is being parsed straight into a quote in the code block.
The fully parsed out statement ends up being:UPDATE "Sales Header" SET stagedstatus='STAGED 8/22/05' WHERE "No."='SO11947'
However I have good news which is that I figured out my problem - in creating the DSN it is necessary to go into the advanced options and change "identifiers" to all thanks to Navision's horrible horrible field naming conventions. The reason why the field "No." couldn't be found is due to the period character which was fine after I changed identifiers to all.0 -
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