and as you see in the stored procedure below i am getting the sum of the hours and calling it 'totalTime' ..the store procedure works just great (tested it) ..but i always get the error of: Item cannot be found in the collection corresponding to the requested name or ordinal. which basically means that it can not find that field name within the sql statement. when doing the sql statement outside of a store procedure..it works just fine. any ideas? calling the stored procedure via a page like thissSqlAllocatedHours = "sp_selectAllocatedHours'" & strDate1 & "', '" & strDate2 & "', '" & strOrg & "', '" & strDept & "', '" & strTeam & "'"set rsAllocatedHours = objConn.Execute(sSqlAllocatedHours)strAllocatedHours = rsAllocatedHours("totalTime")Alter Procedure sp_selectAllocatedHours@date1 datetime,@date2 datetime,@profileorg varchar(255),@profiledept varchar(255),@profileteam varchar(255)Asdeclare @sql varchar(512)if (@profileorg <> '') BEGIN set @sql = 'select sum(convert(decimal(10,4), b.hours)) as totalTime from profile as a inner join projecttime as b on (b.profileemail = a.profileemail)' if (@date1 <> '') and (@date2 <> '') BEGIN set @sql = @sql+ 'where b.workdate between @date1 and @date2' END if (@profileorg <> '') and (@date1 = '') or (@date2 = '') BEGIN set @sql = @sql + ' where a.profile_org = @profileorg' END if (@profileorg <> '') and (@date1 <> '') or (@date2 <> '') BEGIN set @sql = @sql + ' and a.profile_org = @profileorg' END if (@profileorg <> '') and (@profiledept <> '') BEGIN set @sql = @sql + ' and a.profile_dept = @profiledept' END if (@profileorg <> '') and (@profiledept <> '') and (@profileteam <> '') BEGIN set @sql = @sql + ' and a.profile_team = @profileteam' END ENDelse BEGIN set @sql = 'select sum(convert(decimal(10,4), b.hours)) as totalTime from profile as a inner join projecttime as b on (b.profileemail = a.profileemail)' ENDselect @sqlreturn