Package.CheckpointFileName Property
Gets or sets the name of the file that captures the checkpoint information, which enables a package to restart.
命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
語法
'宣告
<EditorAttribute("Microsoft.DataTransformationServices.Controls.NonValidatingFileNameEditor, Microsoft.DataTransformationServices.Controls, Version=9.00.242.00, Culture=neutral, PublicKeyToken=89845dcd8080cc91", GetType(UITypeEditor))> _
Public Property CheckpointFileName As String
[EditorAttribute("Microsoft.DataTransformationServices.Controls.NonValidatingFileNameEditor, Microsoft.DataTransformationServices.Controls, Version=9.00.242.00, Culture=neutral, PublicKeyToken=89845dcd8080cc91", typeof(UITypeEditor))]
public string CheckpointFileName { get; set; }
[EditorAttribute(L"Microsoft.DataTransformationServices.Controls.NonValidatingFileNameEditor, Microsoft.DataTransformationServices.Controls, Version=9.00.242.00, Culture=neutral, PublicKeyToken=89845dcd8080cc91", typeof(UITypeEditor))]
public:
property String^ CheckpointFileName {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_CheckpointFileName ()
/** @property */
public void set_CheckpointFileName (String value)
public function get CheckpointFileName () : String
public function set CheckpointFileName (value : String)
屬性值
A String that contains the name of the checkpoint file.
備註
When the package completes successfully, this file is deleted. For more information about using checkpoints, see 在封裝中使用檢查點.
範例
The following example loads a package, and then retrieves several package properties, including the CheckpointFileName.
Class PackageTest
{
static void Main(string[] args)
{
// The variable pkg points to the location of the
// ExecuteProcess package sample
// installed with the samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Application app = new Application();
Package p = app.LoadPackage(pkg, null);
// Once the package is loaded, this sample can
// query on several properties
long cc = p.CertificateContext;
string cfn = p.CheckpointFileName;
DTSProtectionLevel pl = p.ProtectionLevel;
DTSPackageType dpt = p.PackageType;
Console.WriteLine("CertificateContext = " + cc);
Console.WriteLine("CheckpointFileName = " + cfn);
Console.WriteLine("ProtectionLevel = " + pl);
Console.WriteLine("PackageType = " + dpt);
}
}
Class PackageTest
{
Shared Sub Main(ByVal args() As String)
' The variable pkg points to the location of the
' ExecuteProcess package sample
' installed with the samples.
Dim pkg As String = "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"
Dim app As Application = New Application()
Dim p As Package = app.LoadPackage(pkg,Nothing)
' Once the package is loaded, this sample can
' query on several properties
Dim cc As Long = p.CertificateContext
Dim cfn As String = p.CheckpointFileName
Dim pl As DTSProtectionLevel = p.ProtectionLevel
Dim dpt As DTSPackageType = p.PackageType
Console.WriteLine("CertificateContext = " + cc)
Console.WriteLine("CheckpointFileName = " + cfn)
Console.WriteLine("ProtectionLevel = " + pl)
Console.WriteLine("PackageType = " + dpt)
End Sub
}
Sample Output:
CertificateContext = 0
CheckpointFileName =
ProtectionLevel = EncryptSensitiveWithUserKey
PackageType = Default
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace