Hi all![]()
How to check Null value in the array
See this
VB Code:
Dim FileName() As String = Nothing If Not IsDBNull(DataTable.Rows(0).Item("Document")) Then FileName = Split(DataTable.Rows(0).Item("Document"), ",") For Index As Integer = 0 To UBound(FileName) Me.lstFiles.Items.Add(Application.StartupPath & "\ShaktiProjectAttachDocument\" & FileName(Index)) Next
if this is IsDBNull(DataTable.Rows(0).Item("Document")) Nothing then then there is Null in the array and the error will occuring here.For Index As Integer = 0 To UBound(FileName)
so How to avoid this error.![]()




Reply With Quote