Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returned param value has no decimals
Message
De
28/01/2008 14:57:59
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01286059
Message ID:
01286291
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform