Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Index Server and SQL

Posted on 2002-05-15
5
322 Views
Last Modified: 2008-03-10
NT4/SP6a/IIS4/Index Server 2

Trying to query the Index Server using SQL like:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "provider=msidxs;data source=thisWeb;"
SQL = "Select DocTitle, vpath, size from Scope('" + chr(34) + "\thisWeb" + chr(34) + "') WHERE CONTAINS('ASP')"
Set rs = Conn.Execute(SQL)

and it ain't working.

Gives
Microsoft OLE DB Provider for Microsoft Index Server error '80040e14'

Incorrect syntax near <end of input>. Expected '>'. SQLSTATE=42000

0
Comment
Question by:JOK
  • 3
  • 2
5 Comments
 
LVL 18

Expert Comment

by:bruno
ID: 7012731
umm...this is a guess, but give it a shot...think we had this problem too...

forget my reasoning, but i have this in my code....so not sure if this was part of the problem.  try adding the extra "> 0" at the end as shown below...


SQL = "Select DocTitle, vpath, size from Scope('" + chr(34) + "\thisWeb" + chr(34) + "') WHERE CONTAINS('ASP') > 0"


BRUNO
0
 
LVL 18

Accepted Solution

by:
bruno earned 200 total points
ID: 7012732
that should all be one line...don't think it came out that way?


SQL = "Select DocTitle, vpath, size from Scope('" + chr(34) + "\thisWeb" + chr(34) + "') WHERE CONTAINS('ASP') > 0"
0
 
LVL 3

Author Comment

by:JOK
ID: 7013588
I got it fixed. Not sure what the problem was, 'tho.

Ended up hardcoding the path like
SQL = "select characterization,docTitle,VPATH,rank from scope('Deep traversal of ""e:\foldera\docs""') where Contains(Contents," & thisSearchTerm & ")>0 order by Rank DESC"

and prior to that
thisTerm = Request.Form("searchterm")
thisSearchTerm = chr(39) & chr(34) & thisTerm & chr(34) & chr(39)
0
 
LVL 18

Expert Comment

by:bruno
ID: 7013685
so you did throw in the " > 0"?

regardless, glad you got it working.  :-)


BRUNO
0
 
LVL 3

Author Comment

by:JOK
ID: 7014072
got PART of it working, so I'm okay.

Trying to do it to a different folder and its giving me exception errors. Geez.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question