Great.

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:39 PM
To: CF-Talk
Subject: RE: What is wrong with this Insert Query?


Hi, Mark...

Changed the problem line from:

<cfqueryparam cfsqltype="CF_SQL_DATE" Value="#Form.PaymentDate#">

to:

<cfqueryparam cfsqltype="CF_SQL_DATE" Value="#DateFormat(Form.PaymentDate,
'M/D/YYYY')#">

And it worked fine.

Thanks for the help...

Rick


-----Original Message-----
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 11:31 PM
To: CF-Talk
Subject: RE: What is wrong with this Insert Query?


Rick,

Create a string that is correctly formatted as a date (i.e.
dateformat(form.date,'mm-dd-yyyy') or whatever), then try passing it in as a
char( ) data type.  That usually works on other platforms.

-Mark

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 PM
To: CF-Talk
Subject: What is wrong with this Insert Query?


Hi, all.

mySQL 4.0.1, Win2K Pro

I'm running this Insert Query:

The #Form.PaymentDate# coming from the form shows up as
{d '2002-12-16'} (before processing below):

<CFQUERY Name="InsertPayment" Datasource="#DSN#">
     Insert into rentcofeepayments
                     (RentalCompanyID, PaymentDate, PaymentMethod,
PaymentAmount)
          Values (<cfqueryparam cfsqltype="CF_SQL_BIGINT"
Value="#Form.RentalCompanyID#">,
                      <cfqueryparam cfsqltype="CF_SQL_DATE"
Value="#CreateODBCDate(Form.PaymentDate)#">,
                      <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
Value="#Form.PaymentMethod#">,
                      <cfqueryparam cfsqltype="CF_SQL_DOUBLE"
Value="#Form.PaymentAmount#">)
</CFQUERY>

But getting this error:

CFQUERYPARAM data conversion error

There is a data conversion error for CFQUERYPARAM #2.

How do I modify it to make it work?
I added the CreateODBCDate into the code, but that didn't help...

Thanks,

Rick





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to