I am trying to run a stored procedure and the display the results in a datagrid. <BR><BR> Dim Confirmed As String<BR> Dim Filter As String<BR> Dim SearchString As String<BR> <BR> Confirmed = ddlConfirmed.SelectedItem.Value<BR> Filter = ddlFilter.SelectedItem.Value<BR> SearchString = txtSearch.Text<BR><BR> Dim strConn As String = Commonf.dbConnect()<BR> Dim Conn As SqlConnection = New SqlConnection(strConn)<BR> Dim objSPComm As New SqlCommand("ContactsSearch2", Conn)<BR> objSPComm.CommandType = CommandType.StoredProcedure<BR><BR> Dim objParameter1 As New SqlParameter("@Confirmed", SqlDbType.NChar, 50)<BR> objSPComm.Parameters.Add(objParameter1)<BR> objParameter1.Direction = ParameterDirection.Input<BR> objParameter1.Value = Confirmed<BR><BR> Dim objParameter2 As New SqlParameter("@Filter", SqlDbType.NChar, 50)<BR> objSPComm.Parameters.Add(objParameter2)<BR> objParameter2.Direction = ParameterDirection.Input<BR> objParameter2.Value = Filter<BR><BR> Dim objParameter3 As New SqlParameter("@SearchTerm", SqlDbType.NChar, 50)<BR> objSPComm.Parameters.Add(objParameter3)<BR> objParameter3.Direction = ParameterDirection.Input<BR> objParameter3.Value = SearchString<BR><BR><BR> Conn.Open()<BR> Try<BR> dgContacts.DataSource = objSPComm.ExecuteReader()<BR> dgContacts.DataBind()<BR> Catch<BR> lblTotalPages.Text = SearchString<BR> End Try<BR> Conn.Close()<BR><BR>when I step into the program when I get to this line dgContacts.DataSource = objSPComm.ExecuteReader()<BR>and look at the records affected it says -1, which I would assume means that the SP failed to retrieve any results. When I execute the SP in Query Analyzer it seems to work fine<BR><BR>SP looks like this<BR><BR>CREATE PROCEDURE dbo.ContactsSearch2<BR>(<BR>@SearchTerm nvarchar(50) = NULL,<BR>@Filter nvarchar(50) = NULL,<BR>@OrderBy nvarchar(50) = Null,<BR>@Confirmed nvarchar(50) = NULL<BR>)<BR><BR>AS<BR>SET NOCOUNT ON<BR><BR>IF (@Filter = "ALL")<BR> <BR> SELECT * FROM vContactsAndCoaches WHERE <BR> (LastName LIKE @SearchTerm) OR <BR> (FirstName LIKE @SearchTerm) OR <BR> (Email LIKE @SearchTerm) OR <BR> (ReferredBy LIKE @SearchTerm) OR <BR> (HomePhone LIKE @SearchTerm) OR <BR> (StockNo LIKE @SearchTerm) OR <BR> (SerialNo LIKE @SearchTerm) OR <BR> (Address LIKE @SearchTerm) OR <BR> (City LIKE @SearchTerm) OR <BR> (State LIKE @SearchTerm) OR <BR> (Location LIKE @SearchTerm) OR <BR> (MiddleName LIKE @SearchTerm) OR <BR> (Zip LIKE @SearchTerm) OR <BR> (Email2 LIKE @SearchTerm) OR <BR> (Origin LIKE @SearchTerm) OR <BR> (Location LIKE @SearchTerm) OR <BR> (EnteredBy LIKE @SearchTerm) OR <BR> (UpdatedBy LIKE @SearchTerm) OR <BR> (SpouseFirstName LIKE @SearchTerm) OR <BR> (CONVERT(varchar, ContactID) LIKE @SearchTerm) <BR>GO<BR><BR>Any ideas?