Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF vs IIF
Message
From
08/04/2002 10:05:09
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
IF vs IIF
Miscellaneous
Thread ID:
00642169
Message ID:
00642169
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform