Partager via


Propriété OleDbProviderSettings.DisallowAdHocAccess

Gets or sets the Boolean property value that specifies whether SQL Server allows ad hoc access to data by using OPENROWSET and OPENDATASOURCE functions with the OLE DB provider.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property DisallowAdHocAccess As Boolean 
    Get 
    Set
'Utilisation
Dim instance As OleDbProviderSettings 
Dim value As Boolean 

value = instance.DisallowAdHocAccess

instance.DisallowAdHocAccess = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public bool DisallowAdHocAccess { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property bool DisallowAdHocAccess {
    bool get ();
    void set (bool value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member DisallowAdHocAccess : bool with get, set
function get DisallowAdHocAccess () : boolean 
function set DisallowAdHocAccess (value : boolean)

Valeur de propriété

Type : System.Boolean
A Boolean value that specifies whether SQL Server allows ad hoc functions with the OLE DB provider.If True, ad hoc functions are not allowed.If False (default), ad hoc function are allowed.

Exemples

Utilisation de serveurs liés dans SMO

Voir aussi

Référence

OleDbProviderSettings Classe

Espace de noms Microsoft.SqlServer.Management.Smo