SQL Server Developer Center > SQL Server Forums > Transact-SQL > @ATTACHMENT PROBLEM FOR SHARED FOLDERS
Ask a questionAsk a question
 

Question@ATTACHMENT PROBLEM FOR SHARED FOLDERS

  • Wednesday, November 04, 2009 9:14 AMrajpes Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    HI I M SENDING A MAIL WITH AN ATTACHMENT WHOSE LOCATION FORMAT IS SHOWN BELOW

    set @attachment='\\10.6.10.10\D$\bills\B002ABTS_KAC_560005_13890771_974015604_80.ps.pdf' THIS WORKS PERFECTLY!
    BUT I DONT WANT TO INCLUDE 'D$'
    SO I SHARED THE FOLDER  AND CHANGED FORMAT AS SHOWN BELOW


     


     set

     

     

     

    @attachment='\\10.6.10.10\bills\B002ABTS_KAC_560005_13890771_974015604_80.ps.pdf'


    BUT ITS GIVING ERROR AS " INVALID"

     

All Replies

  • Wednesday, November 04, 2009 10:23 AMiv69 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    HI Sir,
    can you check that you can see the path using the account under which SQL server is running.
    By the way how you send emails using sp_send_dbmail or other way (custom script  etc..)

    Ivan

  • Wednesday, November 04, 2009 11:45 AMrajpes Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    HI Sir,
    can you check that you can see the path using the account under which SQL server is running.
    By the way how you send emails using sp_send_dbmail or other way (custom script  etc..)

    Ivan


    i am using sp_send_dbmail , i want to execute the code inside a stored procedure
  • Monday, November 09, 2009 11:55 AMiv69 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I suppose SQL server account do not have rights over the share you created,
    this is the reason I am asking you to verify this.

    Ivan