Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returned param value has no decimals
Message
From
28/01/2008 14:57:59
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01286059
Message ID:
01286291
Views:
22
When I changed DbType.Decimal to DbType.Currency it worked.
Thanks.
  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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform