And that gives you

  exec SpNameHere 06/01/2002

so you do integer division on a *date* and get

  exec SpNameHere 0.002997002997002997002997002997003

You must have the enclosing single quotes (which is the date delimeter in
SQL Server).

David L. Penton, Microsoft MVP
JCPenney Technical Specialist / Lead
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED]

Do you have the VBScript Docs or SQL BOL installed?  If not, why not?
VBScript Docs: http://www.davidpenton.com/vbscript
SQL BOL: http://www.davidpenton.com/sqlbol


-----Original Message-----
From: Phillip B. Holmes

EXECUTE is not the answer.

This is exactly correct:

<cfquery datasource="#odbcd#" name="sample">
exec sp_namehere #form.date1#
</cfquery>

Respectfully,
�
<cf_developer>
Phillip B. Holmes
Media Resolutions Inc.
Macromedia Alliance Partner
http://www.mediares.com
[EMAIL PROTECTED]
1-888-395-4678 ext. 101
972-889-0201 ext. 101
</cf_developer>
�
Please send support requests to [EMAIL PROTECTED]






-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 10:28 PM
To: [EMAIL PROTECTED]
Subject: Re: help w/stored proc

Try using execute instead of exec..

You may also try using cfstoredproc instead of the
cfquery tag.

--
Clint Tredway
----------------------------------
Through Him, anything is possible.
> I was writing a stored procedure (I'm new to doing this) with the help
of
> someone who alas had to go home for the day, and I really need to make
it
> work now. I hope someone can help with this.  I copy below the SP
content
> (which went in fine using SQL-S EM), and the query from my file, and
the
> error message.  This is a super simple delete query.  Any ideas?  Many

> thanks in advance.
>
> ================
>
> CREATE PROCEDURE [dbo].[sp_namehere]
> @fnamehere datetime
>
> AS
>
> delete from tablenamehere
> where entryd <= @fnamehere
> GO
>
> ================
>
> <cfquery datasource="#odbcd#" name="sample">
> exec sp_namehere #form.date1#
> </cfquery>
>
> ================
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
> ================
>
> (I know the form.date1 value IS being passed btw.)
>
> Regards,
> Palyne
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Palyne Gaenir
> Science Horizon Web Media
> www.sciencehorizon.com
> [EMAIL PROTECTED]
> cel 918.533.3765  tf 877.316.0763


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to