/// <summary> /// Recursive SetColumns method for data pinning. This populates the buffer and /// calls the inherited SetColumns method. /// </summary> /// <param name="sesid">The session to use.</param> /// <param name="tableid"> /// The table to set the columns in. An update should be prepared. /// </param> /// <param name="columnValues"> /// Column values to set. /// </param> /// <param name="nativeColumns"> /// Structures to put the pinned data in. /// </param> /// <param name="i">Offset of this object in the array.</param> /// <returns>An error code.</returns> internal override unsafe int SetColumns(JET_SESID sesid, JET_TABLEID tableid, ColumnValue[] columnValues, NATIVE_SETCOLUMN* nativeColumns, int i) { if (null != this.Value) { fixed (void* buffer = this.Value) { return this.SetColumns( sesid, tableid, columnValues, nativeColumns, i, buffer, checked(this.Value.Length * sizeof(char)), true); } } return this.SetColumns(sesid, tableid, columnValues, nativeColumns, i, null, 0, false); }
public void Setup() { this.managed = new JET_SETCOLUMN { cbData = 1, columnid = new JET_COLUMNID { Value = 2 }, grbit = SetColumnGrbit.AppendLV, ibLongValue = 3, itagSequence = 4, }; this.native = this.managed.GetNativeSetcolumn(); }