SqlDataRecord.SetDateTime(Int32, DateTime) SqlDataRecord.SetDateTime(Int32, DateTime) SqlDataRecord.SetDateTime(Int32, DateTime) SqlDataRecord.SetDateTime(Int32, DateTime) Method

定义

将存储在列中的数据设置为指定的 DateTime 值。Sets the data stored in the column to the specified DateTime value.

public:
 virtual void SetDateTime(int ordinal, DateTime value);
public virtual void SetDateTime (int ordinal, DateTime value);
abstract member SetDateTime : int * DateTime -> unit
override this.SetDateTime : int * DateTime -> unit
Public Overridable Sub SetDateTime (ordinal As Integer, value As DateTime)

参数

ordinal
Int32 Int32 Int32 Int32

从零开始的列序号。The zero-based ordinal of the column.

value
DateTime DateTime DateTime DateTime

列的新值。The new value of the column.

异常

ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

适用于