Although I think the cfsqltype="cf_sql_timestamp" is the correct answer.  I
found a reference to using it in a reference book also.  I still get an
error message.

Error Diagnostic Information
ODBC Error Code = 22008 (Datetime field overflow)


[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
datetime from character string.



I printed the value out before I called the procedure and it shows the date
as 2002-10-15.  I have tried to used both the CreateODBCDate(NewDueDate) and
DateFormat(NewDueDate, "yyyy-mm-dd") but returns the same error message.
Any clues because God knows that I'm clueless!  Thanks!

Gary 8-)
----- Original Message -----
From: "Kwang Suh" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 3:21 PM
Subject: RE: CFStoredProc cfsqltype="cf_sql_Date" doesn't work with
SmallDateTime SQL Type...Why?


> 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/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
> 
______________________________________________________________________
Get Your Own 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=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to