Question
Stored Procedures and Error Message stating missing parameter - when it is not
HI there
I have a call to a SQL Server stored procedure that reads as follows:
------------------------------------------------------------------------------------------
<cfstoredproc procedure="insertNewRSS" datasource="rssfeeder" returncode="yes"
result="thisVariable" debug="yes">
<cfprocparam dbvarname="ID" value="#ID#" cfsqltype="CF_SQL_INTEGER">
<cfprocparam dbvarname="CREATEDDATE" value="#CREATEDDATE#" cfsqltype="cf_sql_date">
<cfprocparam dbvarname="COMMENTS" value="#COMMENTS#" cfsqltype="cf_sql_longvarchar">
------------------------------------------------------------------------------------------
The code above is preceeded by a call to an RSS feed, so it is populated.
The stored procedure that it calls reads as follows:
------------------------------------------------------------------------------------------
ALTER PROCEDURE [sa2].[insertNewRSS] (@ID int, @CREATEDDATE datetime,
@COMMENTS [nvarchar](max))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO rssRaw
(ID, CreatedDate, Comments)
VALUES (@ID, @CREATEDDATE, @COMMENTS)
END
------------------------------------------------------------------------------------------
I receive the following error message, and cannot work out why it is being reported, when when the parameter is explicitly passed.
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Procedure or function 'insertNewRSS' expects parameter '@COMMENTS', which was not supplied.
Does anyone have any ideas?
Regards
Me
I have a call to a SQL Server stored procedure that reads as follows:
------------------------------------------------------------------------------------------
<cfstoredproc procedure="insertNewRSS" datasource="rssfeeder" returncode="yes"
result="thisVariable" debug="yes">
<cfprocparam dbvarname="ID" value="#ID#" cfsqltype="CF_SQL_INTEGER">
<cfprocparam dbvarname="CREATEDDATE" value="#CREATEDDATE#" cfsqltype="cf_sql_date">
<cfprocparam dbvarname="COMMENTS" value="#COMMENTS#" cfsqltype="cf_sql_longvarchar">
------------------------------------------------------------------------------------------
The code above is preceeded by a call to an RSS feed, so it is populated.
The stored procedure that it calls reads as follows:
------------------------------------------------------------------------------------------
ALTER PROCEDURE [sa2].[insertNewRSS] (@ID int, @CREATEDDATE datetime,
@COMMENTS [nvarchar](max))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO rssRaw
(ID, CreatedDate, Comments)
VALUES (@ID, @CREATEDDATE, @COMMENTS)
END
------------------------------------------------------------------------------------------
I receive the following error message, and cannot work out why it is being reported, when when the parameter is explicitly passed.
Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]Procedure or function 'insertNewRSS' expects parameter '@COMMENTS', which was not supplied.
Does anyone have any ideas?
Regards
Me
