Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with full text search sql....

Status
Not open for further replies.

alexjamesbrown

Programmer
Mar 7, 2007
8
GB
Hi there,
i have a Full text search on a table... tblProducts
I am trying to query it, to search the descriptions of products..

this is the code i use (or part of it)


strQuery = "Exec spSearchProducts '"&request("keywords")&"'"
Set rsProducts = Server.CreateObject("ADODB.Recordset")

rsProducts.Open strQuery, conn, 1, 1 'Opened as Read-Only




spSearchProducts:

CREATE PROCEDURE spSearchProducts(

@Query VarChar(100)

)
AS
BEGIN
SELECT * from
tblProducts
WHERE
FREETEXT(ProductDescription, @Query)
END

I get this error:


A variable cannot be used to specify a search condition in a fulltext predicate when accessed through a cursor.

Any idea of how to fix it?

Alex
 
It's got to do with the way that the ASP is opening the record set. thread183-1106608

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top