Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF vs IIF
Message
De
08/04/2002 10:05:09
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
IF vs IIF
Divers
Thread ID:
00642169
Message ID:
00642169
Vues:
50
All,

I have the following:
If .IsDBNull(4) Then
	mStrFirstName = ""
Else
	mStrFirstName = .GetString(4)
End If
but I would like to use:

mStrFirstName = IIf(.IsDBNull(4), "", .GetString(4))


Unfortunately I get the message:

Option Strict On disallows implicit conversion from "System.Object" to "String"

How can I change the IIF to allow the command?

TIA

Rex
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform