This documentation is archived and is not being maintained.

SqlFunctionAttribute.DataAccess Property

Indicates whether the function involves access to user data stored in the local instance of SQL Server.

Namespace: Microsoft.SqlServer.Server
Assembly: System.Data (in system.data.dll)

public DataAccessKind DataAccess { get; set; }
/** @property */
public DataAccessKind get_DataAccess ()

/** @property */
public void set_DataAccess (DataAccessKind value)

public function get DataAccess () : DataAccessKind

public function set DataAccess (value : DataAccessKind)

Not applicable.

Property Value

DataAccessKind.None: Does not access data. DataAccessKind.Read: Only reads user data.

It 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 DataAccessKind.Read property should be set.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: