Problem of Permissions for Linked Servers in .net page

Discussion in 'ASP .Net' started by savvy, Jan 19, 2006.

  1. savvy

    savvy Guest

    I searching using Keywords in MS Word and pdf documents for which i
    have used the Index Server and linked with SQL Server but when i am
    running the stored procedure thro my webpage i'm getting these errors.
    And when i run this code in Query Analyzer its giving expeceted
    results. I dont know where the problem is can anyone help please . I'm
    really badly stuck. Thanks in Advacne

    User does not have permission to perform this action. Line 3: Incorrect
    syntax near '@searchstring'. Invalid object name 'FileSearchResults'.
    And my stored procedure is given below

    CREATE PROCEDURE SelectIndexServerCVpaths
    (
    @searchstring varchar(100)
    )
    AS
    Exec sp_addlinkedserver FileSystem,
    'Index Server',
    'MSIDXS',
    'Web',
    'c:\inetpub\wwwroot\sap-resources\Uploads'
    IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
    WHERE TABLE_NAME = 'FileSearchResults')
    DROP VIEW FileSearchResults
    EXEC ('CREATE VIEW FileSearchResults AS SELECT * FROM
    OPENQUERY(FileSystem,''SELECT Directory, FileName,
    DocAuthor, Size, Create, Write, Path FROM
    SCOPE() WHERE FREETEXT(''@searchstring'')'')')
    SELECT * FROM FileSearchResults F, CVdetails C WHERE C.CV_Path = F.PATH
    AND C.DefaultID=1
    GO
     
    savvy, Jan 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. buran
    Replies:
    1
    Views:
    383
    Jim Douglas
    May 12, 2004
  2. Scott Allen
    Replies:
    0
    Views:
    440
    Scott Allen
    Jul 13, 2004
  3. Chris Ritchey
    Replies:
    7
    Views:
    484
    emerth
    Jul 10, 2003
  4. Chris Ritchey

    Generating a char* from a linked list of linked lists

    Chris Ritchey, Jul 9, 2003, in forum: C Programming
    Replies:
    7
    Views:
    472
    emerth
    Jul 10, 2003
  5. Curt K
    Replies:
    0
    Views:
    565
    Curt K
    Nov 3, 2006
Loading...

Share This Page