Try using CF_SQL_TIMESTAMP.
-----Original Message-----
From: Gary Ashbaugh [mailto:[EMAIL PROTECTED]]
Sent: February 7, 2002 12:38 PM
To: CF-Talk
Subject: CFStoredProc cfsqltype="cf_sql_Date" doesn't work with
SmallDateTime SQL Type...Why?
When I use cf_sql_Date for the cfsqltype with in my cfstoredproc for
a
SmallDateTime SQL field, I get an error...why?
ERROR MESSAGE RECEIVED:
ODBC Error Code = 07001 (Wrong number of parameters)
[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax er
ror,
COLDFUSION CODE:
<cfStoredProc datasource="#Source#" Procedure="Add_FYSetup">
<cfprocparam type="in" cfsqltype="cf_sql_char" dbvarname
="@FY"
value="#Session.CFY#">
<cfprocparam type="in" cfsqltype="cf_sql_Date" dbvarname
="@Due_Date"
value="#DateFormat(NewDueDate, "MM/DD/YYYY")#">
<cfprocparam type="in" cfsqltype="cf_sql_char"
dbvarname="@Contact_Person" value="#Contact_Person#">
<cfprocparam type="in" cfsqltype="cf_sql_char"
dbvarname="@Contact_Phone" value="#Contact_Phone#">
<cfprocparam type="Out" cfsqltype="cf_sql_integer" dbvarname
="@RetVal"
variable="FYSetupRetVal">
<cfprocparam type="Out" cfsqltype="cf_sql_char" dbvarname
="@RetMsg"
variable="FYSetupRetMsg">
<cfprocresult name="SetupNewFY">
</cfstoredproc>
SQL STORED PROCEDURE:
CREATE PROCEDURE [Add_FYSetup]
(@FY nvarchar(4)=NULL,
@Due_Date smalldatetime=NULL,
@Contact_Person nvarchar(50)=NULL,
@Contact_Phone nvarchar(14)=NULL,
@RetVal int = NULL Output,
@RetMsg nvarchar(100) = NULL Output)
AS...
Here is the database structure:
FY nvarchar(4)
Due_Date smalldatetime
Contact_Person nvarchar(50)
Contact_Phone nvarchar(14)
Gary
_____________________________________________________________________
_
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20
GB
MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists