locked
error handling in vb.net RRS feed

  • Question

  • User180152678 posted

    I need advice for modify my code using here. I am creating function for search data using textbox and button. i want to put an error handling in my code which if the data was not found then it will appear in message box "Data is not found. This function is connected to database. For your info i am using visual studio and sql 2005. Here is my code and i also attach my picture

    Private Sub Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click
    Me.StaffBindingSource.Filter = "NAME = '" & Me.txtsearch.Text & "'"
    txtsearch.Clear()
    End Sub

    Sunday, August 28, 2011 11:37 PM

Answers

All replies