FileStream after file is deleted in file explorer, then error in SQL

234 Views Asked by At

I set up FileSTream on my SQL Server database. Files were created on file system, that was all OK. Then due to some incident, some files were deleted off the file system. But SQL still points rows to files. When I try to set new bytes[] in FileStream column, I have an error (because in order to set up new bytes[], SQL first tries to delete old file on file system, but can't find it since it's already removed from file system). How can I do to set new bytes[] to rows where file has been deleted without getting this error ? How to deal with this kind of mistakes ?

0

There are 0 best solutions below