Share via


Propriété IsFileStream

Obtient la valeur Boolean qui spécifie si le groupe de fichiers est de type FILESTREAM.

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

Syntaxe

'Déclaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone)> _
Public Property IsFileStream As Boolean
    Get
    Set
'Utilisation
Dim instance As FileGroup
Dim value As Boolean

value = instance.IsFileStream

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

Valeur de propriété

Type : System. . :: . .Boolean
Valeur Boolean qui spécifie si le groupe de fichiers est de type FILESTREAM.
Si la valeur est True, le groupe de fichiers est de type FILESTREAM. Dans le cas contraire, la valeur est False.

Notes

This property is not alterable by the application.

Exemples

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Management.Smo;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //Connect to the local, default instance of SQL Server.
            Server svr = new Server();

            //Define a Database object instance by supplying the server
            //and the database name arguments in the constructor.
            Database db = new Database(svr, "MyPhotos");

            //Create the database on the instance of SQL Server.
            db.Create();

            //Define a FileGroup object instance for creation of FILESTREAM
            //groups by supplying the database, group name, and supplying
            //true for the isFileStream parameters.

            FileGroup myFileGroup = new FileGroup(db, "MyPhotoGroup", true);

            if (myFileGroup.IsFileStream == true)
                Console.WriteLine("MyPhotoGroup is enabled for the creation of a FILESTREAM file group.");

            //Remove the database to clean up.
            db.Drop();
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Management.Smo

Module Module1

    Sub Main()
        'Connect to the local, default instance of SQL Server. 
        Dim svr As New Server()

        'Define a Database object instance by supplying the server 
        'and the database name arguments in the constructor. 
        Dim db As New Database(svr, "MyPhotos")

        'Create the database on the instance of SQL Server. 
        db.Create()

        'Define a FileGroup object instance for creation of FILESTREAM 
        'groups by supplying the database, group name, and supplying 
        'true for the isFileStream parameters. 

        Dim myFileGroup As New FileGroup(db, "MyPhotoGroup", True)

        If myFileGroup.IsFileStream = True Then
            Console.WriteLine("MyPhotoGroup is enabled for the creation of a FILESTREAM file group.")
        End If

        'Remove the database to clean up. 
        db.Drop()

    End Sub
End Module