Re: FTS Weighted Values Implementation Problem
- From: Organic Man <davidmcmillin@xxxxxxx>
- Date: Mon, 03 Sep 2007 10:50:24 -0700
Still getting a syntax error with ( + RealWeight1.ToString() + ),
System.Data.SqlClient.SqlException was unhandled
Class=15
ErrorCode=-2146232060
LineNumber=1
Message="Syntax error near 'RealWeight1.ToString' in the full-text
search condition 'ISABOUT ("gold" weight ( + RealWeight1.ToString()
+ ), "silver" weight (.4), "copper" weight (.2) )'."
When I stepped through it in debug mode, there was no value assigned
to RealWeight1.To String().
If I cast to string datatype before the Select statement:
Dim Weight1 As Integer
Weight1 = WeightTextBox1.Text
Dim RealWeight1 As Double
RealWeight1 = Weight1 * 0.1
RealWeight1 = RealWeight1.ToString
and use string syntax in the Select statement:
(""" + RealWeight1 + """),
and step through it in debugger, the value of RealWeight1 in the
Select statement is 0.8 (as it should be). But this is a string
value, not double or decimal.
I am wondering if the Select statement is looking for a double or
decimal datatype for the weight value? So even if a string is
provided with the correct value (e.g., 0.8), it is not accepted
because it is the wrong datatype?
I am learning a lot here (I think), and am confident I will get this
to work with your help. Greatly appreciate your patience and
expertise.
On Sep 3, 1:12 pm, "Jean-Pierre Riehl" <jean-pierre.ri...@xxxxxxxxxxxxxx> wrote:
It is another VB.NET syntax problem ;-)
You have to convert your numeric value to string with ToString() function.
Double quote are useless as you expect that result : weight(0.8)
New query is :
[...] 'ISABOUT (""" + SearchTerm1 + """ weight ( + RealWeight1.ToString()
+ ), """ + SearchTerm2 [...]
--
Jean-Pierre Riehlhttp://blog.djeepy1.nethttp://www.bewise.fr
"Organic Man" <davidmcmil...@xxxxxxx> wrote in message
news:1188837558.402664.317710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- Re: FTS Weighted Values Implementation Problem
- References:
- FTS Weighted Values Implementation Problem
- From: Organic Man
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- Re: FTS Weighted Values Implementation Problem
- From: Organic Man
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- Re: FTS Weighted Values Implementation Problem
- From: Organic Man
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- Re: FTS Weighted Values Implementation Problem
- From: Organic Man
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- Re: FTS Weighted Values Implementation Problem
- From: Organic Man
- Re: FTS Weighted Values Implementation Problem
- From: Jean-Pierre Riehl
- FTS Weighted Values Implementation Problem
- Prev by Date: Re: FTS Weighted Values Implementation Problem
- Next by Date: Re: double space handling
- Previous by thread: Re: FTS Weighted Values Implementation Problem
- Next by thread: Re: FTS Weighted Values Implementation Problem
- Index(es):
Relevant Pages
|
Loading