Title: Message

 

See Scott's email earlier today...

 

Can the <cfoutput><pre> </cfoutput></pre> within the <cfquery> - in no way are these supported in that position.

 

Brian's suggestion was for you to output the contents of the query to the page.

 

Good luck.

 

Sarah Atkinson
Global Applications Team Leader

Lonely Planet Publications, Aust.
Telephone: +61 3 8379 8000
[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 March 2003 11:48 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: New look up date by years old with a 2 year spread < 2 > 2

 

Hi

I tired that one but still getting an error.

Dont know what to do any one with more pointers

 

<cfset Form.age =5>
<!--- set age diff --->
<cfset Older = Form.age + 2>
<cfset Younger = Form.age - 2>

<!--- create the dates --->
<cfoutput>
<cfset Olderthan = dateformat(DateAdd("yyyy", -Older, Now()),'yyyy-mm-dd')>
<cfset Youngerthan = dateformat(DateAdd("yyyy",-Younger,Now()),'yyyy-mm-dd')>
get all records where member was born between #Olderthan# and #Youngerthan#
</cfoutput>

<cfquery name="getRecord" datasource="interact">
 <cfoutput><pre>
 SELECT  Talent.talentID , 
  Talent.Name ,
  Talent.Gender ,
  Talent.DOB ,
  Talent.Hair ,
  Talent.Eye ,
  Talent.Height ,
  Talent.Clothessize ,
  Talent.shoesize ,
  Talent.hobbies ,
  Talent.BIO ,
  Talent.Compcard ,
  Talent.ID
 FROM   Talent
 where (Talent.DOB <= {d '#Olderthan#'} and Talent.DOB >= {d '#Youngerthan#'})
</pre></cfoutput>
</cfquery>

 

 

Error Diagnostic Information

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

[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.

SQL = "

  SELECT  Talent.talentID ,  
         Talent.Name , 
         Talent.Gender , 
         Talent.DOB , 
         Talent.Hair , 
         Talent.Eye , 
         Talent.Height , 
         Talent.Clothessize , 
         Talent.shoesize , 
         Talent.hobbies , 
         Talent.BIO , 
         Talent.Compcard , 
         Talent.ID
  FROM    Talent
  where (Talent.DOB <= {d '1996-03-20'} and Talent.DOB >= {d '2000-03-20'})

"

Data Source = "INTERACT"

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (16:1) to (16:48) in the template file C:\Documents and Settings\Greg Stone.GREG\My Documents\client coldfusion workfiles\interact\application\members\test.cfm.

Date/Time: 03/20/03 11:41:57
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; YComp 5.0.2.4; .NET CLR 1.0.3705)
Remote Address: 127.0.0.1
HTTP Referer: http://127.0.0.1/mydocuments/client%20coldfusion%20workfiles/interact/application/members/test.cfm

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/ ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.

<<attachment: image001.jpg>>

Reply via email to