vb.net
I am unable to retrive data from a data set based on the value in a textbox into a data grid.
I am getting the error Object reference not set to an instance of an object.
The code is as follows in vb.net:
Dim search As String = Txtsearchname.Text
OleDbDataAdapter2.SelectCommand.Parameters("Name").Value = search//error
DataSet21.Clear()
OleDbDataAdapter2.Fill(DataSet21)
i am entering a name in the textbox TxtsearchName, based on the name entered in the text box the data grid should display all the details of that particular person.
I passed the name as parameter.

