CREATE PROCEDURE qGetStates

@state_ID int

AS

SELECT ....

First you should only one input parameter for state_ID, as I assume you are
doing a select statement.. If you need the two values, than rename one of
the parameters. Second, make sure you've actually set the stored procedure
to expect params.

Darryl

-----Original Message-----
From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 8:25 AM
To: CF-Talk
Subject: Stored Procedure Question


I have the following code:

<cfstoredproc datasource="#WME.DSN#" procedure="qGetStates"
returncode="Yes">
 <cfprocparam type="In" dbvarname="@State_ID" value="#license_state_ID#"
cfsqltype="CF_SQL_INTEGER">
 <cfprocparam type="In" dbvarname="@State_ID" value="#state_ID#"
cfsqltype="CF_SQL_INTEGER">
 <cfprocresult name="qGetStates">
</cfstoredproc>

I have the SP on the SQl Server and it works. However, when I run the page,
I receive the following error message:

Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation) 


[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure qGetStates has no
parameters and arguments were supplied. 


SQL = "qGetStates" 

Data Source = "WME" 


The error occurred while processing an element with a general identifier of
(CFSTOREDPROC), occupying document position (7:1) to (7:77).

I have debugging on and the form variables are being passed. I have also
prefixed the values with Form. and it still does not work.



Thanks,

-bs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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