DtsProperty.GetValue Method
Returns the value of the property.
네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
구문
‘선언
Public Function GetValue ( _
o As Object _
) As Object
public Object GetValue (
Object o
)
public:
Object^ GetValue (
Object^ o
)
public Object GetValue (
Object o
)
public function GetValue (
o : Object
) : Object
매개 변수
- o
The parent object of the property whose value is to be returned.
반환 값
An object that contains the value of the property.
주의
업데이트된 텍스트:2006년 7월 17일
When you request the value of a property by calling the GetValue method, the object that you must pass as a parameter is the object to which the property belongs. For example, if you are working with an OLE DB connection manager as shown in the following example, and you have created a DtsProperty object for its ServerName property, then you would pass the connection manager object as the parameter to the GetValue method.
예
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace DtsPropertyGetValueCS
{
class Program
{
static void Main(string[] args)
{
Package testPackage;
ConnectionManager testConnection;
DtsProperty testProperty;
string propertyValue;
testPackage = new Package();
testConnection = testPackage.Connections.Add("OLEDB");
testConnection.ConnectionString = "Provider=SQLOLEDB;" +
"Data Source=(local);Initial Catalog=AdventureWorks;" +
"Integrated Security=SSPI";
testConnection.Name = "Test Connection Manager";
testProperty = testConnection.Properties["ServerName"];
propertyValue = testProperty.GetValue(testConnection).ToString();
Console.WriteLine("The value of ServerName is: " + propertyValue);
Console.Read();
}
}
}
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
Dim testPackage As Package
Dim testConnection As ConnectionManager
Dim testProperty As DtsProperty
Dim propertyValue As String
testPackage = New Package()
testConnection = testPackage.Connections.Add("OLEDB")
testConnection.ConnectionString = "Provider=SQLOLEDB;" & _
"Data Source=(local);Initial Catalog=AdventureWorks;" & _
"Integrated Security=SSPI"
testConnection.Name = "Test Connection Manager"
testProperty = testConnection.Properties("ServerName")
propertyValue = testProperty.GetValue(testConnection).ToString()
Console.WriteLine("The value of ServerName is: " & propertyValue)
Console.Read()
End Sub
End Module
스레드 보안
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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
DtsProperty Class
DtsProperty Members
Microsoft.SqlServer.Dts.Runtime Namespace