C
Co
Hi All,
I'm new on dotnet and I have some function that give me a warning that
my code doesn't return a result on all code paths, I should have a
null reference exeption:
Private Function PopulateStatus()
Dim sql = "SELECT * FROM Status"
Dim cmd As New OleDbCommand(sql, conn)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
Try
While dr.Read()
cboStatus.Items.Add(dr.Item("status"))
End While
Catch Ex As Exception
End Try
End Function
How do you create something like that?
Regards
Marco
The Netherlands
I'm new on dotnet and I have some function that give me a warning that
my code doesn't return a result on all code paths, I should have a
null reference exeption:
Private Function PopulateStatus()
Dim sql = "SELECT * FROM Status"
Dim cmd As New OleDbCommand(sql, conn)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader()
Try
While dr.Read()
cboStatus.Items.Add(dr.Item("status"))
End While
Catch Ex As Exception
End Try
End Function
How do you create something like that?
Regards
Marco
The Netherlands