seems like a null enddate?

-----Original Message-----
From: Ian Westbrook [mailto:[EMAIL PROTECTED]
Sent: 29 September 2003 17:18
To: cfug dev list
Subject: [ cf-dev ] syntax error


another good old syntax error. I've stared at this for half an hour, can't
see what's wrong. anyone else any ideas?

<cfset fromdate=createdate(year(now()),month(now()),day(now()))>

<!-- this for gardner -->
<cfquery datasource="artsoutheast" name="grabdiary">
SELECT *
FROM story_info
WHERE name = 'gardner'
AND story_type = 'diary'
AND
(( event_start_date >= #fromdate#)
OR
( event_end_date >= #fromdate#))
</cfquery>

<cfoutput query="grabdiary">

<cfset start = CreateODBCDate(DateFormat(event_start_date, 'yyyy-mm-dd'))>

<cfif event_end_date IS NOT ''>
<cfset end = CreateODBCDate(DateFormat(event_end_date, 'yyyy-mm-dd'))>
<cfelse>
<cfset end = ''>
</cfif>


<cfquery datasource="#dsn#">
INSERT INTO diary (directoryid, reviewid, startdate, enddate, artform,
ticketprice, title, familyfriendly, audiodescribed, signed, surtext,
description, publish, eventimage, dateadded, edpick) VALUES (1, 0,
#variables.start#, #variables.end#, 0, 'varies', '#story_title#', 'no',
'no', 'no', 'no', '#story_copy#', 'no', '#story_image#',
#CreateODBCDate(Now())#, 'no')
</cfquery>

</cfoutput>

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

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement. 


SQL = "INSERT INTO diary (directoryid, reviewid, startdate, enddate,
artform, ticketprice, title, familyfriendly, audiodescribed, signed,
surtext, description, publish, eventimage, dateadded, edpick) VALUES (1, 0,
{d '2003-10-04'}, , 0, 'varies', 'Nicholas Nickleby [PG]', 'no', 'no', 'no',
'no', 'An all star cast including Christopher Plummer, Jamie Bell and Jim
Broadbent head up this adaptation of one of Dicken's best-loved novels. ',
'no', '', {d '2003-09-29'}, 'no')" 

Data Source = "ARTSOUTHEASTDEV" 


The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (36:1) to (36:28) in the template
file D:\artsoutheast\test\changedb.cfm.

I wish the error messages would be a bit more useful - like telling you
where in the query it had got to before the syntax error occurred...

any help appreciated.

Ian W
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful.  Please inform the sender and delete the message
immediately from your system.  This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to