i have this function and it is giving me this warning. and i have many similar functions
so by the time i'll be done i'll have a thousand warnings how can i get rid of the warnings
Function 'SelectRows_local' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.
Public Function SelectRows_Web(ByVal query As String) As DataTable 'Dim Conn_web As SqlConnection Dim Conn_web As SqlConnection Conn_web = MyFormz.connec.ConnWeb Dim da As New SqlDataAdapter Dim dt As New DataTable dt.Clear() da.SelectCommand = New SqlCommand(query, Conn_web) Try da.Fill(dt) Return dt Catch ex As Exception 'MsgBox(ex.Message) End Try End Function