Overload resolution failed because no Public 'Add' can be called with these arguments: 'Public Function Add(text As String) As System.Windows.Forms.ListViewItem.ListViewSubItem': Argument matching parameter 'text' cannot convert from 'DBNull' to 'String'. 'Public Function Add(item As System.Windows.Forms.ListViewItem.ListViewSubItem) As System.Windows.Forms.ListViewItem.ListViewSubItem': Argument matching parameter 'item' cannot convert from 'DBNull' to 'ListViewSubItem'.
this is my error message pls help me
Public Sub displaydata()
Dim objdatareader As SqlDataReader
Dim strsql As String = "ViewAllContacts"
objdatareader = objcommand.ExecuteReader
While objdatareader.Read
Dim listview As New ListViewItem
With listview
.Text = objdatareader.Item("ContactID")
.SubItems.Add(objdatareader("Lname"))
.SubItems.Add(objdatareader("Fname"))
.SubItems.Add(objdatareader("Mname"))
.SubItems.Add(objdatareader("Address"))
.SubItems.Add(objdatareader("ContactNum"))
.SubItems.Add(objdatareader("EmailAdd"))
.SubItems.Add(objdatareader("DOB"))
End With
ListView1.Items.Add(listview)
End While
End Sub