Visual Basic:
Dim myReader As System.Data.OleDb.OleDbDataReader
myReader = SelectData.ExecuteReader()
While myReader.Read()
str(0) = myReader.GetString(0)
str(1) = myReader.GetString(1)
itm = New ListViewItem(str)
itm.Checked = True ---> error??
ListView1.Items.Add(itm)
In the above code if i write itm.checked=true during runtime i get error. If i ignore the error the item is indeed getting checked.
If the itm.checked=false, i am not getting run time error.
The runtime error i am getting is "Object reference not set to the instance of the object". Can you please tell me why such error is occuring.