I've had the same problem with SP's and <cfstoredproc>

What I did was change the data types for the input parameters  to varchar
and do the checking before I enter the <cfstoredprocedure> tag

I do a lot of dynamic SQL building in my sp's and I have had nothing but
headaches with <cfstoredproc when passing DateTime parameters.

That should at least get your sp working again. I got fed up with trying to
figure out what the whole <cfstoredprocedure> tag is doing . That is one of
the things I don't like about ColdFusion because sometimes it is very hard
to find out what is happening in cases as this.



----- Original Message -----
From: "Bruce Sorge" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 2:27 PM
Subject: Stored Procedure Question


> OK, I have been using SP for a while with no problems. Now I am
encountering an issue. I have a stored procedure that looks like this:
>
> CREATE PROCEDURE Next30Days
> @Next30 DateTime,
> @TodayDate DateTime
> AS
> SELECT Title, Copy, EventDate, EventTime
> FROM Calendar
> Where EventDate < @Next30  And EventDate > @TodayDate
> Order By EventDate, EventTime
> GO
>
> I have my CF code as such:
>
> <!--- Setting the date for 30 days out from today. --->
> <cfset Next30 = DateAdd("d", +30, "#DateFormat(CreateODBCDate(Now()))#")>
>
>
> <cfstoredproc datasource="#Attributes.DataBase#" procedure="Next30Days">
> <cfprocparam cfsqltype="CF_SQL_DATE" dbvarname="@Next30" type="In"
value="#Next30#">
> <cfprocparam cfsqltype="CF_SQL_DATE" dbvarname="@TodayDate" type="In"
value="#DateFormat(CreateODBCDate(Now()))#">
> <cfprocresult name="Next30Days">
> </cfstoredproc>
>
> And I get this in my browser:
>
> ODBC Error Code = S1C00 (Driver not capable)
>
>
> [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
>
>
> SQL = "Next30Days"
>
> Data Source = "EVENTS"
>
>
> I have poured over this SP and the CF code and I cannot see why I am
receiving this. I know that my SQl 2K is working fine because I have other
tables with several (over 100 so far) SP and they all work fine.
>
> Thanks,
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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