C/ODBC SQL Syntax

MMorgan
Member Posts: 7
Kind of lame, but here it is. I've been stumped all day. Can't wait til I get this converted to SQL version, but thought I'd wait until 4.0 for that. (Fixed by then?) In the meantime...I am setting up a portal with ColdFusion. Yeah Yeah....
Using access, I'm able to update a custom field (bool) but can't find the correct syntax for ColdFusion.
Access Syntax (works fine)
UPDATE [Return Line]
SET [Return Line].IntHere = -1
WHERE ((([Return Line].[Document No_])="RA14792") AND (([Return Line].[Line No_])=10000));
CF gets lexical errors if I use the [], so I escaped the spaces with quotes.
Here's the CF version:
<cfquery name="q_arrived" datasource="NAVI37">
UPDATE "Return Line"
SET IntHere = -1
WHERE "Document No_" = 'RA14792' AND "Line No_" = 10000
</cfquery>
Seems to run all the way to the end, but then I get "driver does not support this function" I'm not Read Only, and Updates are allowed.
However, the CF Select query below works just fine.
<cfquery name="q_check" datasource="Navi37">
SELECT "Return Line"."Document No_", "Return Line"."Line No_", "Return Line".No_
FROM "Return Line"
WHERE "Return Line"."Document No_" = 'RA14792' AND "Return Line"."Line No_" = 10000</cfquery>
Sure hope someone can help. I've already got WAY too much time messing with this C/ODBC issue. All Day, in fact.
Using access, I'm able to update a custom field (bool) but can't find the correct syntax for ColdFusion.
Access Syntax (works fine)
UPDATE [Return Line]
SET [Return Line].IntHere = -1
WHERE ((([Return Line].[Document No_])="RA14792") AND (([Return Line].[Line No_])=10000));
CF gets lexical errors if I use the [], so I escaped the spaces with quotes.
Here's the CF version:
<cfquery name="q_arrived" datasource="NAVI37">
UPDATE "Return Line"
SET IntHere = -1
WHERE "Document No_" = 'RA14792' AND "Line No_" = 10000
</cfquery>
Seems to run all the way to the end, but then I get "driver does not support this function" I'm not Read Only, and Updates are allowed.
However, the CF Select query below works just fine.
<cfquery name="q_check" datasource="Navi37">
SELECT "Return Line"."Document No_", "Return Line"."Line No_", "Return Line".No_
FROM "Return Line"
WHERE "Return Line"."Document No_" = 'RA14792' AND "Return Line"."Line No_" = 10000</cfquery>
Sure hope someone can help. I've already got WAY too much time messing with this C/ODBC issue. All Day, in fact.
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