I have created a stored procedure for searching particular keywords in
a MS Word or
PDF docs using Index Server and processes the results through the SQL
Server.
So, it links both Index Server and SQL Server
When I execute this stored proc from my ASP.NET page i'm getting this
error.
Could not execute query against OLE DB provider 'MSIDXS'
My Sql Connection object in my .net page is
SqlConnection objConn = new
SqlConnection("Server=MISC\\MISC;Database=sapresou rces;User
ID=sap;Password=sapres;");
I tried different ways but not able to understand where the problem is
but It works fine when i execute in my Query Analyzer using
Exec SelectIndexServerCVpaths
@searchstring='mykeyword'
Can anybody help ?
Thanks in Advance
CREATE PROCEDURE SelectIndexServerCVpaths
(
@searchstring varchar(100)
)
AS
SET @searchstring = REPLACE( @searchstring, '''', '''''' )
DROP VIEW sapresources.FileSearchResults
EXEC ('CREATE VIEW sapresources.FileSearchResults AS SELECT * FROM
OPENQUERY(FileSystem,''SELECT Directory, FileName,
DocAuthor, Size, Create, Write, Path FROM
SCOPE('''' "c:\inetpub\wwwroot\sap-resources\Uploads" '''') WHERE
FREETEXT(''''' + @searchstring + ''''')'')')
SELECT * FROM CVdetails C, sapresources.FileSearchResults F WHERE
C.CV_Path = F.PATH AND C.DefaultID=1
GO
|