Accessing FILESTREAM from an SQL CLR assembly
Posted
by
superware
on Stack Overflow
See other posts from Stack Overflow
or by superware
Published on 2012-10-20T09:01:13Z
Indexed on
2012/10/22
5:01 UTC
Read the original article
Hit count: 210
I'm trying to stream FILESTREAM data from an unsafe SQL CLR assembly.
The connection string is
Data Source=LAPTOP2\SQLEXPRESS;Initial Catalog=test;Integrated Security=True;Enlist=False
When creating a new SqlFileStream
(inside a SqlTransaction
, of course), I'm getting:
The request is not supported
at OpenSqlFilestream
.
So I decided to try native OpenSqlFilestream
, but then I'm getting an invalid handle (-1) while GetLastWin32Error
returns that same:
The request is not supported (
ERROR_NOT_SUPPORTED
).
I have also tried SqlContext.WindowsIdentity.Impersonate()
with no apparent effect.
I couldn't find any documentation referencing this restriction. Is it really unsupported? If it is unsupported, is there a good reason? Does anyone know of a workaround?
© Stack Overflow or respective owner