The OpenSqlFilestream Native Client API

With an understanding and appreciation of how FILESTREAM is implemented internally by SQL Server, we’re ready now to move forward and store real binary picture data in the Photo column. As we mentioned earlier, this is best achieved by writing client code that calls the OpenSqlFilestream function provided by the SQL Server native client API.

When you work with OpenSqlFilestream, you always work with transactions (even for read access). There is no way to avoid them, since FILESTREAM by design coordinates transactional integrity across structured and unstructured data access between SQL Server and the NTFS file system. (However, we should stress that you normally should try not to read while in a transaction ...

Get Programming Microsoft® SQL Server™ 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.