I've inherited a VB.NET application that INSERTs files into a varBinary(max) in SQL Server using System.Data.SqlClient.
It creates a transaction, uses SQLCommand to INSERT the record, then UPDATES that same record passing in the bytes, this cycle loops in 2Gb chunks until the entire file has been INSERTed. The Transaction is then Committed.
This process locks the table, so if two people try to INSERT documents at the same time, the application hangs for the second person in the queue waiting for it's turn.
I've looked at Does inserting data into SQL Server lock the whole table? There's no reference to TABLOCK anywhere in the code and I can't find what the "certain kinds of bulk load operations" are it refers to but this doesn't seem like a bulk operation.
Any help or ideas how to stop it locking or any or options would be appreciated.