How would I pass the 'MID' variable from a SQL Stored Procedure to CF? The 
Stored Procedure below works fine I've tested it, I think the only thing I'm 
missing is passing the variable to CF correctly.

My Stored Procedure:

CREATE PROCEDURE sp_FrontPageRelease

AS

DELETE HomePageReleases
WHERE ID = (SELECT MIN(ID)FROM HomePageReleases)

UPDATE HomePageReleases SET ListOrder = 4
WHERE ListOrder = 3

UPDATE HomePageReleases SET ListOrder = 3
WHERE ListOrder = 2

UPDATE HomePageReleases SET ListOrder = 2
WHERE ListOrder = 1

DECLARE @MID int
SET @MID = (SELECT MAX(PressID) AS MID FROM PressReleaseTitles)

INSERT INTO HomePageReleases(PressID, ListOrder)
VALUES(@MID, 1)

RETURN @MID

My CF Code:

<CFSTOREDPROC datasource = "#dsn#" name="sp_FrontPageRelease">
<CFPROCPARAM sqltype=CF_SQL_INTEGER dbvarname = @MID variable = MID type = 
out>
</CFSTOREDPROC>

I'm getting an 'sp_FrontPageRelease has no parameters and arguments were 
supplied' error

Thanks again
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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