Using File FILE TABLE and File Stream

  • Hi I have a requirement to detect CSVs loaded onto the server and then UPLOAD them to the Datawarehouse automatically.

    I thought the SQL 2012 File Table with a trigger on it would do the trick.

    I get the filename from the inserted trigger and then perform a bulk insert as per

    TRUNCATE TABLE [dbo].[Invoice_DPD_stage]

    BULK INSERT [dbo].[Invoice_DPD_stage]

    FROM '\\DATABASEServer\ExternalFiles\InvoiceUploads\CSV_Load\Invoice_20151112.csv'

    WITH

    (

    FIRSTROW = 6,

    FIELDTERMINATOR = ',',

    ROWTERMINATOR = '',

    TABLOCK

    )

    Where \\DATABASEServer\ExternalFiles\InvoiceUploads\CSV_Load is the File Stream share set up on the sever.

    However when I run the Bulk insert I get the Following Message.

    Cannot bulk load because the file "\\DatabaseServer\ExternalFiles\InvoiceUploads\CSV_Load\Invoice_DPD_20151112.csv" could not be opened. Operating system error code 50(The request is not supported.).

    I can't find any information on this error regarding SQL File Tables.

    Is this a limitation of FILE_TABLES?

    I can browse the above URL in explorer and the file opens fine.

    Has anyone experienced this or have any idea of what's happening.

    Any info would be much appreciated.

    Regards,

    Simon

  • Ignore I found the answer thanks.

    http://www.sqlservercentral.com/Forums/Topic1476134-3077-2.aspx

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

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