I wish to write a query that inserts a file that resides on the client (C# web server) into a column in the database server (SQL Server), something like INSERT … SELECT * FROM OPENROWSET(BULK…), but without having to save the file on the server machine first.
Is this even possible in SQL?
In SQL Server BLOB Data in .NET: Tutorial, Mohammad Elsheimy explains how it can be done:
Basically, this way the file is read on the client and sent to the database server without a need for a temporary file on the server machine.