Search This Blog

Thursday, July 28, 2011

Procedure or function '' expects parameter '', which was not supplied. exception in sql server while passing parameters from asp.net

Q : Procedure or function '' expects parameter '', which was not supplied.

A:

Below proc throwing the exception if you pass null from ado.net to the stored procedure parameters



alter PROCEDURE [dbo].SP_UpdateHomePageContentDetails
@VideoLink varchar(65) ,
@VideoLinkDescription varchar(65) ,
@P_ReturnValue varchar(50) output
AS
BEGIN



Solution for the above problem is passing null to the parameters as a default value



alter PROCEDURE [dbo].SP_UpdateHomePageContentDetails
@VideoLink varchar(65) = null,
@VideoLinkDescription varchar(65) = null,
@P_ReturnValue varchar(50) output
AS
BEGIN


No comments:

Popular Posts