Dela via


TransArticle.SetColumnDestinationDataType Method

Sets the column data type mapping for a non-SQL Server Publisher.

Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Rmo (in Microsoft.SqlServer.Rmo.dll)

Syntax

'Declaration
Public Sub SetColumnDestinationDataType ( _
    columnName As String, _
    dataType As String, _
    precision As Long, _
    scale As Integer, _
    length As Long _
)
'Usage
Dim instance As TransArticle
Dim columnName As String
Dim dataType As String
Dim precision As Long
Dim scale As Integer
Dim length As Long

instance.SetColumnDestinationDataType(columnName, _
    dataType, precision, scale, length)
public void SetColumnDestinationDataType(
    string columnName,
    string dataType,
    long precision,
    int scale,
    long length
)
public:
void SetColumnDestinationDataType(
    String^ columnName, 
    String^ dataType, 
    long long precision, 
    int scale, 
    long long length
)
member SetColumnDestinationDataType : 
        columnName:string * 
        dataType:string * 
        precision:int64 * 
        scale:int * 
        length:int64 -> unit 
public function SetColumnDestinationDataType(
    columnName : String, 
    dataType : String, 
    precision : long, 
    scale : int, 
    length : long
)

Parameters

  • columnName
    Type: System.String
    A String value that specifies the name of the column for which the destination data type is changed.
  • dataType
    Type: System.String
    A String value that specifies the data type to which the column is changed.
  • precision
    Type: System.Int64
    An Int32 value that specifies the precision of the data type. Set this parameter to -1 if it does not apply to the specified data type.
  • scale
    Type: System.Int32
    An Int32 value that specifies the scale of the data type. Set this parameter to -1 if it does not apply to the specified data type.
  • length
    Type: System.Int64
    An Int32 value that specifies the length of the data type. Set this parameter to -1 if it does not apply to the specified data type.

Remarks

The SetColumnDestinationDataType method is only supported for non-SQL Server Publishers.

The SetColumnDestinationDataType method can only be called by members of the sysadmin fixed server role at the Distributor or by members of the db_owner fixed database role on the database.

Calling SetColumnDestinationDataType is equivalent to executing sp_changearticlecolumndatatype.

The SetColumnDestinationDataType method is only available when working with instances of SQL Server 2005 or later.

This namespace, class, or member is supported only in version 2.0 of the .NET Framework.