语言

PipelineBuffer.SetDateTime(Int32, DateTime) 方法

定义

为该列分配一个DateTime值 PipelineBuffer

public:
 void SetDateTime(int columnIndex, DateTime value);
public void SetDateTime(int columnIndex, DateTime value);
member this.SetDateTime : int * DateTime -> unit
Public Sub SetDateTime (columnIndex As Integer, value As DateTime)

参数

columnIndex
Int32

缓冲区行中该列的索引。

value
DateTime

分配给缓冲区列的值。

注解

SetDateTime 方法为 DateTime 参数指定的 columnIndex 缓冲区列赋予一个值。

该方法适用于以下集成服务数据类型:

DateTime 数值需要比列支持的分数秒更多的数字 DT_DBTIMESTAMP2 时,数据会被截断,发生 a DoesNotFitBufferException

如果缓冲列的 不是 DataTypeDT_DATEDT_DBTIMESTAMP、 ,DT_DBTIMESTAMP2DT_FILETIME ,则发生 。UnsupportedBufferDataTypeException

有关集成服务数据类型的完整列表以及该类中用于各类型的对应GetSet方法PipelineBuffer,请参见“在数据流中与数据类型工作”。

适用于