Re: Query Web Service- internal server error

From: hk (hrkn_at_novonordisk.com)
Date: 11/18/04


Date: Thu, 18 Nov 2004 09:17:00 +0100

Hi

Here's a solution that works

it seems that the querytext has to treated as CDATA!

 queryText = "<![CDATA[select ""DAV:href"", ""DAV:displayname"" ,
""urn:schemas.microsoft.com:fulltextqueryinfo:description"" from
InWear..scope() where contains ('" + textBoxKeyword.Text + "')]]>"

(other code as before)

Kind regards

Henrik

"Mike Linster" <MikeLinster@discussions.microsoft.com> wrote in message
news:65308451-BD21-4E4F-9092-5CDF38064555@microsoft.com...
> Henrik,
>
> In all honesty I did not see anything wrong with your query, but check out
> this blog post
(http://www.paraesthesia.com/blog/comments.php?id=594_0_1_0_C)
> it has a nice utility to show you exactly what type of query is being sent
> and how to set up yours correctly.
>
> HTH
> Mike
>
> "hk" wrote:
>
> > Hi
> >
> > When I try to use the Query Web Service I get this error message:
> >
> > Internal server error message
> >
> > Here is the code:
> >
> > Dim ds As New DataSet
> > Dim row As DataRow
> > Dim search As New SearchService.QueryService
> > Dim query As String
> > Dim queryText As String
> >
> >
> > queryText = "SELECT ""DAV:href"", ""DAV:displayname"" " + _
> > "FROM (TABLE Portal_Content..Scope()) " + _
> > "WHERE CONTAINS('""todo""') "
> >
> > query = "<?xml version=""1.0"" encoding=""utf-8"" ?>" + _
> > "<QueryPacket xmlns=""urn:Microsoft.Search.Query""
> > Revision=""1000"">" + _
> > "<Query domain=""QDomain"" > " + _
> > "<SupportedFormats>" + _
> >
> > "<Format>urn:Microsoft.Search.Response.Document.Document</Format>" + _
> > "</SupportedFormats>" + _
> > "<Context>" + _
> > "<QueryText language=""en-US""
> > type=""MSSQLFT"">" + queryText + "</QueryText>" + _
> > "</Context>" + _
> >
> > "<Range><StartAt>1</StartAt><Count>5</Count></Range>" + _
> > "</Query>" + _
> > "</QueryPacket>"
> >
> > Dim cred As New System.Net.NetworkCredential("user", "password",
> > "domain")
> > search.Credentials = cred
> > ds.Clear()
> > ds = search.QueryEx(query)
> > litContent.Text = ""
> > For Each row In ds.Tables(0).Rows
> > litContent.Text = litContent.Text + row.Item(0) + "<br>" +
> > row.Item(1) + "<br><br>"
> > Next
> >
> >
> >
> >
> > If I use type = STRING in the query and use a simple keyword instead of
> > query text. It Works
> >
> > So as I see it there is either a problem with the mssqlft query
(queryText)
> > or the configuration of the SPS server.
> >
> > Any help will be much appreciated:
> >
> > Kind regards Henrik
> >
> >
> >
> >



Relevant Pages

  • Re: What is it?
    ... can almost be used indoor ... Kind regards ... Henrik ... > I purchased a Garmin nüvi 300 which utilize SiRF III. ...
    (sci.geo.satellite-nav)
  • Re: mp3gain (was: CDbakeOven issue(s))
    ... > Hi Henrik: ... Unfortunately mp3gain only works directly with MP3 files, ... Kind regards, ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Flash equivalent for 12C509A
    ... Funny to see i look at the new MPlab ... Components with new device support include: ... Kind regards ... Henrik ...
    (comp.arch.embedded)
  • IHttpHandler/IHttpModule and Session
    ... How can I use the Session in my own IHttpHandlers and IHttpModules. ... Henrik de Jong ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast