Discussion:
need hwlp. Special character include server's name. --An error occurred while preparing a query for execution against OLE DB provider 'MSIDXS'.
(too old to reply)
Luke
2006-01-26 15:50:16 UTC
Permalink
When I run a script to get information from a index server by a linked
server. I got ann error:


--------------
An error occurred while preparing a query for execution against OLE DB
provider 'MSIDXS'.
[OLE/DB provider returned message: Incorrect syntax near '-1.'.
Expected end-of-file, ';', AS, CREATE, DOT, DOTDOT, DOTDOT_SCOPE,
DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT, SET, WHERE.
SQLSTATE=42000 ]
-----------------------
the script is :

-----------------
SELECT *
FROM OPENQUERY( lsIndexServer,
'Select DocTitle,Filename,Size,PATH,URL from
Bacchus-1.web..SCOPE()')
---------------------

the reason is the machine can not cut "Bacchus-1" as a whole string ,
does any body have any idea to fix this problem
Hilary Cotter
2006-02-03 13:23:02 UTC
Permalink
Use the hosts file to assign a name to your server which does not have a -
in it. For example if the ip address of Bacchus-1 is 10.10.10.10 your hosts
file entry would be

Bacchus1 10.10.10.10 and then query using Bacchus1
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
Post by Luke
When I run a script to get information from a index server by a linked
--------------
An error occurred while preparing a query for execution against OLE DB
provider 'MSIDXS'.
[OLE/DB provider returned message: Incorrect syntax near '-1.'.
Expected end-of-file, ';', AS, CREATE, DOT, DOTDOT, DOTDOT_SCOPE,
DOTDOTDOT, DOTDOTDOT_SCOPE, DROP, ORDER_BY, SELECT, SET, WHERE.
SQLSTATE=42000 ]
-----------------------
-----------------
SELECT *
FROM OPENQUERY( lsIndexServer,
'Select DocTitle,Filename,Size,PATH,URL from
Bacchus-1.web..SCOPE()')
---------------------
the reason is the machine can not cut "Bacchus-1" as a whole string ,
does any body have any idea to fix this problem
Loading...