Public Function GetItemCostSum(ByVal lnReqID As Integer) As Decimal 'Create the parameter and set the direction Dim param2 As IDbDataParameter = Me.CreateParameter("@ItemSum", 0, DbType.Currency) param2.Direction = ParameterDirection.Output Dim param1 As IDbDataParameter = Me.CreateParameter("@ReqID", lnReqID) param1.Direction = ParameterDirection.Input 'Call the stored procedure and pass the parameter(s) Dim cmd As IDbCommand = Nothing Me.ExecSprocScalar("GetItemCostSum", cmd, param1, param2) Dim lnSubItems As Decimal lnSubItems = CDec(param2.Value) Return lnSubItems End Function