Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am designing web application I am getting this error while executing. please help me to fix this. Below code is the stored procedure.
SQL
ALTER PROCEDURE [dbo].[UpdateRegistration]( 
    @Title nvarchar(500)
    ,@CounterParty nvarchar(200) 
    ,@Company nvarchar(10)
    ,@Custodian  varchar(25)
    ,@OwnerDepartment  varchar(100)
    ,@Remarks  nvarchar(1000)
    ,@Status  varchar(2)
    ,@SecurityLevel  varchar(2)
    ,@CreatedBy  varchar(25)
    ,@CreatedOn datetime
    )
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 dbo.Registration
                (Title
                ,Counterparty
                ,Company
                ,Custodian
                ,OwnerDepartment
                ,Remarks
                ,Status
                ,SecurityLevel
                ,CreatedBy
                ,CreatedOn)

    VALUES
    (            @Title
                ,@Counterparty
                ,@Company
                ,@Custodian
                ,@OwnerDepartment
                ,@Remarks
                ,@Status
                ,@SecurityLevel
                ,@CreatedBy
                ,@CreatedOn
                )
        END
Posted
Updated 9-Dec-15 19:01pm
v2

1 solution

You need to pass value for parameter '@CreatedBy' when you are executing store procedure.
 
Share this answer
 
Comments
saisupraja 10-Dec-15 1:16am    
I Understood from the error I am searching for what changes should made so that I can execute without error.
Saad Saadi 10-Dec-15 1:34am    
Please share your C# code, I can help you after seeing the code.
Thank You!
Santosh K. Tripathi 10-Dec-15 3:30am    
pass value for '@CreatedBy' from you C# code.
saisupraja 10-Dec-15 3:55am    
Ok thanks @santhosh
Santosh K. Tripathi 10-Dec-15 20:30pm    
Welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900