Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I put this up earlier but still nee

Status
Not open for further replies.

leadman

Programmer
Jun 11, 2001
177
US
I put this up earlier but still need help:

I moved this query from one template to another (copy and paste) and now it doesnt work. I dont understand the error message. ive triple checked this one though - the form that leads to this template IS passing a hidden variable called "orderid" and that template definitely has access to the value (im having it appear on the page to make sure) !!! - dont know if these things matter but: the query is the first thing in the template (before any HTML), and these are all secure pages.

=============CODE BEGIN===============

<cfquery name=&quot;checkshipping&quot; datasource=&quot;mydata&quot; maxrows=&quot;1&quot;>
SELECT * FROM shipping
WHERE sID IN (SELECT frn_shipping_id FROM orders WHERE orderid = #form.orderid#)
</cfquery>
==============CODE END================

=============ERROR BEGIN===============

ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression 'orderid = #form.orderid#'.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (2:1) to (2:77).
=============ERROR END===============
 
It looks to me like the problem may be on the referring page. When you set the hidden field, check to see that you are between cfoutput tags. It appears that the form is actually submitting the string &quot;#form.order_id#&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top