'Get sum of items Public Function GetItemCostSum(ByVal lnReqID As Integer) As Decimal 'Create the parameter and set the direction Dim param2 As IDbDataParameter = Me.CreateParameter("@ItemSum", 0) 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) 'Retrieve the value from the command object Dim param As IDbDataParameter = CType(cmd.Parameters("@ItemSum"), IDbDataParameter) param.DbType = DbType.Currency param.Precision = 11 'Length = 9 + Scale = 2 param.Scale = 2 'Decimal places Dim lnSubItems As Decimal lnSubItems = CDec(param.Value) Return lnSubItems End FunctionCan anyone tell me if the syntax is wrong or what I am doing wrong?