EasyCFM.COM ColdFusion Forums / Coding Help! / every one ,please help me :

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: every one ,please help me :

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

cold_liu
12-08-2002 @ 6:46 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 12
Joined: Dec 2002

i should submit the nubmer by form select,
but the programm show error, who can tell me the couse, thank you very much~
my code:
<cfif isdefined("form.submit1")>
<cfset date=dateformat(#form.select1#&#form.select2#&#form.select3#,yyyy-mm-dd)>
</cfif>
<cfparam name="date" default="#createodbcdate(#date#)#">
<cfoutput>#date#</cfoutput>
<cfquery datasource="#application.datasource#" name="jryw">
select *
from news
where xwlm='½ñÈÕÒªÎÅ'
and fbsj='#date#'
</cfquery> Question

:)

webedge
12-08-2002 @ 9:17 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 238
Joined: Nov 2002

Can you post the text of the error you are getting please?

Phil

No matter how much you polish a turd, it's still a turd...

WebmasterEdge.com - Online resources for Webmasters

cold_liu
12-08-2002 @ 9:34 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 12
Joined: Dec 2002

the erroe infomation is (but i think you can not know my means because i use the chineselanguage,55~~:
my site url is :http://cfmx.vicp.net/tz/
Error Occurred While Processing Request  
Error Executing Database Query.  
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Óï·¨´íÎó (²Ù×÷·û¶ªÊ§) ÔÚ²éѯ±í´ïʽ 'xwlm='½ñÈÕÒªÎÅ' and fbsj='{ts '2002-12-09 12:35:50'}'' ÖС£  



:)

webedge
12-09-2002 @ 2:21 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 238
Joined: Nov 2002

Although my chinese is highly limited, ie. none Smile   I think I know where your problem is.

In your query you have the line: and fbsj='#date#'.  Try replacing that line with and fbsj=#date#

Just remove the ' around the #date# as the dat format is a numerical string not text so it doesn't need the the ' on either side of the CF variable.

See if that works and if not, let me know.


Phil

No matter how much you polish a turd, it's still a turd...

WebmasterEdge.com - Online resources for Webmasters

This message was edited by webedge on 12-9-02 @ 2:23 AM

CJ
12-10-2002 @ 1:17 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

Just a tip...

'Date' is generally not considered to be a good variable name, as it is a reserved word in many applications (such as Access).

Consider naming your variable myDate or even theDate...but preferrably something intuitive such as startDate or endDate or joinDate, etc Smile

CJ

cold_liu
12-10-2002 @ 8:19 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 12
Joined: Dec 2002

thank for your answer and this problem i had smooth out ,thank you very much again Smile

:)


Website Designed and Developed by Pablo Varando.