Hello. <BR>I’m currently working on a project for our company’s intranet, and it consists of an employee search page, made in ASP.NET. <BR>I wanted to try and use a Data-Grid Control and it works fine with a global SELECT statement. <BR>I wanted to make a search on the employee DB based on the Name field and using a LIKE clause, so that if a user typed “john”, all records containing “john” anywhere on the Name field would be returned. The page works fine, no compilation errors but the search doesn’t return any records. <BR>Maybe the parameter can’t be passed to a LIKE clause. <BR><BR>Here is the code: <BR><BR>Sub GetEmp_Click(Sender As Object, E As EventArgs) <BR><BR>Dim DS As DataSet <BR>Dim MyConnection As SqlConnection <BR>Dim MyCommand As SqlDataAdapter <BR>Dim SelectCommand as String <BR><BR>SelectCommand = "SELECT * FROM EMP WHERE upper(NAME) LIKE upper(&#039;%@name%&#039;)" <BR><BR>MyConnection = New SqlConnection("server=server; database=db; UID=user; PWD=passwrd") <BR>MyCommand = New SqlDataAdapter(SelectCommand, MyConnection) <BR><BR><BR>MyCommand.SelectCommand.Parameters.Add (New SqlParameter("@name", SqlDbType.NVarChar, 20)) <BR>MyCommand.SelectCommand.Parameters("@name").Va lue = txtNomeEmp.Text <BR><BR>DS = new DataSet() <BR>MyCommand.Fill(DS, "Emp") <BR><BR>MyDataGrid.DataSource=DS.Tables("Emp").Def aultView <BR>MyDataGrid.DataBind() <BR><BR>End Sub <BR><BR>Thank you. <BR>Fernando Calçada <BR>Assistant Consultant <BR>PortGetronics, Lda. <BR>Lisbon, Portugal <BR>