Dela via


SqlFunctionAttribute.DataAccess Property

Definition

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.

Applies to