I think I figured it out, or at least it works. Maybe someone can tell me if
I am right.

In the invocation of the function I had it like...

 <CFINVOKE COMPONENT="components/commonQrys"
 METHOD="CommitAdSave"
 VisitorID = "#Val(session.VisitorProfile.VisitorID)#"
 AdID = "#Val(adid)#"
 DateSent = "#DateFormat(Now(),"yyyy-mm-dd")#"   <---This line
 RETURNVARIABLE="any">
 </CFINVOKE>

I changed it to

 <CFINVOKE COMPONENT="components/commonQrys"
 METHOD="CommitAdSave"
 VisitorID = "#Val(session.VisitorProfile.VisitorID)#"
 AdID = "#Val(adid)#"
 DateSent = "Now()"        <----To this
 RETURNVARIABLE="any">
 </CFINVOKE>



Doug

----- Original Message ----- 
From: "Doug Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Saturday, November 25, 2006 2:28 PM
Subject: What am I doing wrong? (Problem with <cfqueryparam>)


> This works
>
>  <CFQUERY DATASOURCE="#APPLICATION.DB#" USERNAME="#APPLICATION.UN#"
PASSWORD="#APPLICATION.PW#">
>  INSERT INTO #APPLICATION.DBPRE#VisSaveAd
>   (VisitorID,
>    AdID,
>    DateSent)
>  VALUES
>   (#Val(ARGUMENTS.VisitorID)#,
>    #Val(ARGUMENTS.AdID)#,
>    '#Trim(ARGUMENTS.DateSent)#')
>
>  </CFQUERY>
>
> And this gives a String or binary data would be truncated error. The
CF_SQL_TYPES are correct as far as the database table is concerned.
>
>
>
>  <CFQUERY DATASOURCE="#APPLICATION.DB#" USERNAME="#APPLICATION.UN#"
PASSWORD="#APPLICATION.PW#">
>  INSERT INTO #APPLICATION.DBPRE#VisSaveAd
>   (VisitorID,
>    AdID,
>    DateSent)
>  VALUES
>
>   (<cfqueryparam cfsqltype="CF_SQL_BIGINT"
value="#Val(ARGUMENTS.VisitorID)#">,
>    <cfqueryparam cfsqltype="CF_SQL_BIGINT" value="#Val(ARGUMENTS.AdID)#">,
>    <cfqueryparam cfsqltype="CF_SQL_CHAR"
value="'#Trim(ARGUMENTS.DateSent)#'">)
>
>  </CFQUERY>
>
>
> Thanks
>
> Doug B.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261665
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to