Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8545049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:42:06+00:00 2026-06-11T12:42:06+00:00

So I have a Customers table on a sql 2008 server which I bind

  • 0

So I have a Customers table on a sql 2008 server which I bind to a gridview in my app. The search button rebinds the table with the following code:

ControlParameter ctrlParam = new ControlParameter();
ctrlParam.ControlID = "SearchTextBox";
ctrlParam.PropertyName = "Text";
ctrlParam.Name = "Search";
QueryStringParameter ctrlParam2 = new QueryStringParameter();
ctrlParam2.DefaultValue = "Canceled";
ctrlParam2.QueryStringField = "Canceled";

ctrlParam2.Name = "CustomerStatus";
ctrlParam2.Type = TypeCode.String;
SqlDataSource1.SelectParameters.Clear();
SqlDataSource1.SelectParameters.Add(ctrlParam);
SqlDataSource1.SelectParameters.Add(ctrlParam2);
SqlDataSource1.SelectCommand = "SELECT FullText_for_Customers.RANK, [CustomerId], [CustomerStatus], [CustomerGroup], [CustomerFirstName], [CustomerLastName], [CustomerFullName], [CompanyName], [CustomerAddress], [CustomerCity], [CustomerState], [CustomerZipcode], [CustomerFullAddress], [CustomerEmail], [CustomerEmail2], [CustomerPhoneNumber], [CustomerPhoneNumberExt], [CustomerType], [CustomerSubscriptionType], [CustomerCost], [CustomerPaymentMethod], [CustomerPickUpDay], [CustomerPickUpDay2], [CustomerSignUpDate], [CustomerNotes], [CustomerDriver] FROM [Customers] INNER JOIN FREETEXTTABLE(Customers, (CustomerFirstName, CustomerLastName, CustomerFullName, CompanyName, CustomerAddress, CustomerCity, CustomerState, CustomerZipcode, CustomerFullAddress, CustomerEmail, CustomerEmail2, CustomerPhoneNumber, CustomerNotes), @Search) as FullText_for_Customers ON FullText_for_Customers.[KEY]=Customers.CustomerId WHERE ([CustomerStatus] <> @CustomerStatus) ORDER BY FullText_for_Customers.RANK DESC";

Now when the GridView is split into CustomerID, CustomerFirstName, CustomerLastName, CustomerPickUpDay, and CustomerSignUpDate.

When I search, I search just names, but I have to enter the full first or last name, I can’t just type in a part of it; like take my last name, Bonilla, I have to search Bonilla for a result to be displayed, I can’t just search Bon or Bo or illa. How could I have this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:42:08+00:00Added an answer on June 11, 2026 at 12:42 pm

    Free text search doesn’t really work like that. However, you can get an approximation. Use CONTAINSTABLE instead of FREETEXTTABLE and append an asterisk (*) to your search term. That way, you’ll get names that start with “Bo” or “Bon”. There is no way to get names that end in “illa”, however.

    (Additionally, by using FREETEXTTABLE, you’re asking the database to put your search terms through a thesaurus, which, for names, is probably a bad idea.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SQL Server 2008. I have a table Customers customer_number int field1 varchar
I have the following code in one of my Sql (2008) Stored Procs which
I have a simple database table (SQL Server 2008 R2 Express), which has a
SQL Server 2008 Database Question. I have 2 tables, for arguments sake called Customers
I have a table Customer with 2 columns Name and Surname (sql Server 2008).
I am using SQL Server 2008 and I have the following SQL script: Select
I have a Model created with a table called Customers. It contains the following
I have two tables in a SQL Server 2008 database in my company. The
I have developed an application using VB.NET, Visual Studio 2008 and the SQL Server
I have a table MYTABLE. This contains customers and locations. What Sql statement can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.