SqlFunctionAttribute.DataAccess Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether the function involves access to user data stored in the local instance of SQL Server.
public:
property Microsoft::Data::SqlClient::Server::DataAccessKind DataAccess { Microsoft::Data::SqlClient::Server::DataAccessKind get(); void set(Microsoft::Data::SqlClient::Server::DataAccessKind value); };
public Microsoft.Data.SqlClient.Server.DataAccessKind DataAccess { get; set; }
member this.DataAccess : Microsoft.Data.SqlClient.Server.DataAccessKind with get, set
Public Property DataAccess As DataAccessKind
Property Value
DataAccessKind.None
: Does not access data. DataAccessKind.Read
: Only reads user data.
Remarks
The default is None.DataAccess is also required when connecting to remote servers if transactions integration is required (the default).
If a Transact-SQL query is executed from inside a table-valued function (TVF), the Read property should be set.