2008-03-21, 11:23 PM
psycik Wrote:"Is nothing" in vb.net is equivalent to "== null"
And "if (not object is nothing) then" is the not clause.
But sometimes DB stuff doesn't recognise null, and needs the DBNull. Which is probably why sub has done it his way.
Can't get the affirmative or negative going. Searching everywhere for inline check. Might have to build a errhandler...
Code:
If dataReader.GetString(dataReader.GetOrdinal("argb_color")) Is Nothing Then
myGenre.argb = ""
Else
myGenre.argb = dataReader.GetString(dataReader.GetOrdinal("argb_color"))
End If
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]