Re: FTS Weighted Values Implementation Problem



Does your SearchTerm variables contain characters like parenthesis or comma ?
Can you dump the full T-SQL before pass it to DataAdapter ?

--
Jean-Pierre


"Organic Man" <davidmcmillin@xxxxxxx> wrote in message news:1188773249.589988.16370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Jean-Pierre,

I modified my Select statement as you suggested:

Dim adp As New SqlDataAdapter("SELECT FT_TBL.FullDocNo,
FT_TBL.DocType, KEY_TBL.RANK FROM FullDocuments AS FT_TBL INNER JOIN
CONTAINSTABLE(FullDocuments, SectionText, 'ISABOUT ("SearchTerm1"
weight (.8), "SearchTerm2" weight (.4), "SearchTerm3" weight (.2) )' )
AS KEY_TBL ON FT_TBL.FullDocumentID = KEY_TBL.[KEY] ORDER BY
KEY_TBL.RANK DESC ", conn)

I am getting an error on "SearchTerm1" (but not on SearchTerm2 or
SearchTerm3) which states:

Error 1 Comma, ')', or a valid expression continuation expected.

I've tried pasting in the variable directly to make sure it isn't a
typo or such. Any thoughts?

On Sep 2, 5:49 am, "Jean-Pierre Riehl" <jean-pierre.ri...@b-e-w-i-s-
e.fr> wrote:
Hi,

...ISABOUT (' """ & SearchTerm1 & """ ' weight (.8), ...
gives
...ISABOUT (' "a useless phrase " ' weight (.8), ...

The syntax error comes from the simple quotes surrounding your search
phrase. The right syntax is :

...ISABOUT ("a useless phrase " weight (.8), ...

--
Jean-Pierre Riehlhttp://blog.djeepy1.nethttp://www.bewise.fr



.


Loading