SqlDataRecord.SetValue(Int32, Object) 方法
定义
为列序号指定的列设置新值,表示为公共语言运行时 (CLR) 类型。Sets a new value, expressed as a common language runtime (CLR) type, for the column specified by the column ordinal.
public:
virtual void SetValue(int ordinal, System::Object ^ value);
public virtual void SetValue (int ordinal, object value);
abstract member SetValue : int * obj -> unit
override this.SetValue : int * obj -> unit
Public Overridable Sub SetValue (ordinal As Integer, value As Object)
参数
- ordinal
- Int32
从零开始的列序号。The zero-based ordinal of the column.
- value
- Object
指定列的新值。The new value for the specified column.
例外
ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).
注解
value 是装箱为实例的 SQL 类型 Object 。value is a SQL type boxed as a Object instance.