Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
The data reader returned by the store data provider does not have enough columns for the query requested.



XML
Line 1553:            }
Line 1554:
Line 1555:            return base.ExecuteFunction<Nullable<global::System.Int32>>("SalaryMonthly", employeeIdParameter);
Line 1556:        }
Line 1557:




my store procedere


SQL
ALTER PROCEDURE [dbo].[SalaryMonthly]
@EmployeeId int
AS
declare @i int,@presentday int,@OneDaySalary int, @totalDay int,@NetSalary int,@Month int,@year int
set @totalDay=(select datediff(day, GETDATE(), dateadd(month, 1, GETDATE())))
set @presentday =(select PresentDay from TblAttendeceMonthly where EmployeeId=@EmployeeId)
set @OneDaySalary =(select salary from  TblSalary where EmploeeId=@EmployeeId)/@totalDay
set @NetSalary=@presentday * @OneDaySalary
set @Month=(SELECT DATEPART(MM, GETDATE()))
set @year=(SELECT DATEPART(YY, GETDATE()))
BEGIN
if @presentday is not null
begin
    insert into TblSalaryMonthly  values (@EmployeeId,@NetSalary,@Month,@year,@presentday,1,0,GETDATE(),null )
end
end


exec SalaryMonthly 41
Posted
Updated 24-Apr-14 2:20am
v2
Comments
Abinash_Sahoo 24-Apr-14 9:35am    
Where is your C# code to execute the procedure? what's the return type of "exec SalaryMonthly 41" call?
[no name] 24-Apr-14 11:42am    
in store procedure
Abinash_Sahoo 25-Apr-14 13:45pm    
what do you mean?

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