SqlDataRecord.SetTimeSpan(Int32, TimeSpan) SqlDataRecord.SetTimeSpan(Int32, TimeSpan) SqlDataRecord.SetTimeSpan(Int32, TimeSpan) SqlDataRecord.SetTimeSpan(Int32, TimeSpan) Method

定义

设置为 TimeSpan 指定的列的值。Sets the value of the column specified to the TimeSpan.

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

参数

ordinal
Int32 Int32 Int32 Int32

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

value
TimeSpan TimeSpan TimeSpan TimeSpan

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

异常

传入的 ordinal 是负数。The ordinal passed in is a negative number.

传入的 TimeSpan 值的长度大于 24 小时。The TimeSpan value passed in is greater than 24 hours in length.

适用于