File Stream error : The system cannot find the file specified

  • Hi

    I get the error below when trying to access a file using SqlFileStream in C#, I'm adding to this forum because I think that I might be missing something in the SQL maybe.

    I run the SQL like below inside a transaction

    select Top 1 BinaryData.PathName() as BinaryDataPathName,

    GET_FILESTREAM_TRANSACTION_CONTEXT () as FileStreamContext

    from SimpleFiles WHERE SimpleFileID = '1'

    and I get the results

    BinaryDataPathName :\\GORDONPC\MSSQLSERVER\v1\TestDB\dbo\SimpleFiles\BinaryData\B9E43AC8-2726-4329-A9E1-D9E5E0C1C369

    FileStreamContext : 0x3048BB8A85D75748ACEB63D1C3821CE3

    Please try help me, have been struggling with this for a long time now and can't think of any reason for this not to work.


    The Fastest Methods aren't always the Quickest Methods

  • Have you tried checking that the appropriate permissions are in place? Does the login being used actually have access to that directory?

    Just a gut feeling - never used C Octothorpe in anger - but that would be my guess

    I'm a DBA.
    I'm not paid to solve problems. I'm paid to prevent them.

  • Does the user loging into SQL need to have permissions or the SQL Agent or maybe some other SQL Service?


    The Fastest Methods aren't always the Quickest Methods

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply