Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

passing search words from ASP.NET page to FULL TEXT Search in SQL SERVER 2000?

Hi,

I created FULL TEXT Catalog on SQL Server 2000 database.
I am trying to search records on several tables.
I have this textbox on asp.net page (NET 2.0).
I have a sql string of "select xx,xxx from table1 where contains(columnName, '" + textbox1.text + "')";

This is giving out exception.
I tried with one with TextBox1.Text.Trim() but still same error.
1) Do you know what I did wrong here??

2) About the Full Text Search, do you know if it is searching the whole search or search each of the tokenized words??
SOLUTION
Avatar of Chumad
Chumad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18
dkim18

ASKER

I typed  China toys in the textbox and this is the error I got.

Syntax error occurred near 'toys'. Expected "" in search condition 'China toys'.
SqlException was unhandled by user code.

In my sql I just put a simple select * from table.
It returns records just find.


ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18

ASKER

My other question on another thread was if SQL SERVER's Full Text Search would parse the search string into single words or not??

I would think it would automaticall parse the string.
I will check into it.

Thanks.
If it does, I've never seen it, and I've messed with full-text quite a bit.  My experience is limited to SQL 2000 (don't know about the new version of SQL Server)