...

View Full Version : Indexing Service: Query another Server



warrior23
08-04-2004, 12:10 PM
Hi,

How do I query another server's indexing service?

I got following code:

Set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.Open "provider=msidxs;Data Source=System;"
Query = "select filename,size,path from SCOPE() where filename LIKE '%boot.ini%'"
Set Rs = dbConn.Execute(Query)
Which works fine locally. Now, to query a remote server, I've read that this should work:


Set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.Open "provider=msidxs"
Query = "select filename,size,path from Computername.Catalogname..SCOPE() where filename LIKE '%boot.ini%'"
Set Rs = dbConn.Execute(Query)

But I always get following Error:
Error Type:
Microsoft OLE DB Provider for Indexing Service (0x80040E14)
Incorrect syntax near '-'. Expected end-of-file, ';', AS, CREATE, DOT, DOTDOT, DOTDOT_SCOPE, DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT, SET, WHERE. SQLSTATE=42000
/i/index.asp, line 9 (=the line, where dbConn.Execute gets performed)

What have I done wrong?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum