Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use of question mark in parameters
Message
De
07/11/2011 11:48:36
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01528240
Message ID:
01528269
Vues:
39
>In String you need to omit ?. String is not a simple type like integer, for example. So, you can pass null without declaring string?, just declare parameter as string.

So, the adjustment I made is this:
        ' Avoid to receive a null
        ' expC1 Value
        Public Function GetNonNullable(ByVal tcValue As String) As String
            Dim lcValue As Integer = ""

            ' If we have a value
            If Not tcValue Is DBNull.Value Then
                lcValue = tcValue
            End If

            Return lcValue
        End Function
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform