|
Hi
thank you for all who helped yesterday
i am still stuck so i decided to clean up and
simplfy the code to help debug
here we go again:
<cfset Form.age =5>
<!--- set age diff ---> <cfset Older = Form.age + 2> <cfset Younger = Form.age - 2> <!--- create the dates
--->
<cfoutput> <cfset Olderthan = #CreateODBCDateTime(DateAdd("yyyy", -Older, Now()))#><br> <cfset Youngerthan = #CreateODBCDateTime(DateAdd("yyyy",-Younger,Now()))#> 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 between ('#Olderthan#') and ('#Youngerthan#') </pre></cfoutput> </cfquery> get all
records where member was born between {ts '1996-03-19 22:06:56'} and {ts
'2000-03-19 22:06:56'}
The ERROR
MESSAGE |
Error Occurred While Processing Request
Error Diagnostic InformationODBC 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 between ('{ts '1996-03-19 22:06:56'}') and ('{ts '2000-03-19 22:06:56'}')
"
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. --- 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/ |
