Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iif(isdbnull correct syntax?
Message
From
30/12/2002 14:03:29
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Iif(isdbnull correct syntax?
Miscellaneous
Thread ID:
00736677
Message ID:
00736677
Views:
66
Hi,

I encountered the following error message with the code below the error message.

An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll
Additional information: Cast from type 'DBNull' to type 'String' is not valid.

MyEmailBody = myDataRow("AccountId") & " " & _
myDataRow("OrderNumber") & " " & _
IIf(IsDBNull(myDataRow("APN")), "", Trim(myDataRow("APN"))) & " " & _
IIf(IsDBNull(myDataRow("StreetNumber")), "", Trim(myDataRow("StreetNumber")))

What is the proper code to cancanate the string?

Any help would be greatly appreciated.


Thanks
Roland
Next
Reply
Map
View

Click here to load this message in the networking platform