Public Sub SelectCustomer() '---how to call a stored procedure (_SP) called "dbo.SelectCustomer" Try Dim ConnectionString As String ConnectionString = ConfigurationSettings.AppSettings("ConnectionString") '---create new adapter and pass it the name of the _SP and connection object Dim DA As New SqlDataAdapter("SelectCustomer", ConnectionString) '---make a new DS Dim DS As New DataSet '---now add parameters/capabilites to the DA and tell it the command to run is a _SP DA.SelectCommand.CommandType = CommandType.StoredProcedure '---name of the _SP DA.SelectCommand.CommandText = ("dbo.SelectCustomer") '---tell it to use the field called LName and the number they type in to find a match DA.SelectCommand.Parameters.Add("@CustID", Trim(txtCust2Find.Text)) DA.Fill(DS, "customers") '---tell Mr. Grid where to connect to DataGrid1.DataSource = DS.Tables("customers") '---make it so! DataGrid1.DataBind() Catch ex As Exception Response.Redirect("sp_Error.aspx") End Try End Sub ' WEB CONFIG CONN STRING