Last modified: January 09, 2012
Applies to: Windows | Windows Server
The JetSetColumns function is similar in behavior to JetSetColumn but allows an application to set multiple column values in a single operation. An array of JET_SETCOLUMN structures is used to describe the set of column values to be set, and to describe input buffers for each column value to be set.
JET_ERR JET_API JetSetColumns( __in JET_SESID sesid, __in JET_TABLEID tableid, __in_out_opt JET_SETCOLUMN* psetcolumn, __in unsigned long csetcolumn );
The session to use for this call.
The cursor to use for this call.
A pointer to an array of one or more JET_SETCOLUMN structures. Each structure includes descriptions of which column value to set and from where to get column data to set.
The number of JET_SETCOLUMN structures in the array given by psetcolumn.
This function returns the JET_ERR datatype with one of the following return codes. For more information about the possible ESE errors, see Extensible Storage Engine Errors and Error Handling Parameters.
The column ID given is outside the legal limits of a column ID.
It is not possible to complete the operation because all activity on the instance associated with the session has ceased as a result of a call to JetStopService.
Same as JET_errNullInvalid.
The column described by the given columnid does not exist in the table.
An illegal attempt was made to update a long value during a insert copy delete original update operation.
The given column value data given in the input buffer exceeds the size limitation either natural for a fixed length column or configured for fixed length text or binary columns. This error is also returned when passing more than 1024 bytes of data for a long column and setting the JET_bitSetIntrinsicLV flag.
It is not possible to complete the operation because the instance associated with the session has encountered a fatal error that requires that access to all data be revoked to protect the integrity of that data. This error will only be returned by Windows XP and later releases.
The given column value data size does not match what is natural for the fixed length data type.
An illegal attempt was made to update an auto-increment column either during an insert or update operation, or to update a version column during a replace operation.
The options supplied are unknown or an illegal combination of known bit settings.
The given psetinfo->cbStruct is not a valid size for the JET_SETINFO structure.
The set column operation attempted to create a duplicate value and specified either JET_bitSetUniqueMultiValues or JET_bitSetUniqueNormalizedMultiValues.
It is not possible to complete the operation because the instance associated with the session has not been initialized yet.
An illegal attempt was made to update a long column value when the calling session was not in a transaction.
An illegal attempt was made to set a non-NULL column to NULL.
The column value could not be set to the value in the input buffer because it would have caused the record to exceed its page size related size limitation. Columns of type JET_coltypLongText or JET_coltypLongBinary can be stored separately from the remaining record data. However, other columns must be stored with the record and can cause the record size limitation to be exceeded. Even long columns require 5-bytes of space within the record as a linkage and this too can lead to JET_errRecordTooBig being returned.
It is not possible to complete the operation because a restore operation is in progress on the instance associated with the session.
The same session cannot be used for more than one thread at the same time. This error will only be returned by Windows XP and later releases.
It is not possible to complete the operation because the instance associated with the session is being shut down.
The cursor is not currently in the process of either inserting a new record or updating an existing record.
The column value in the input buffer exceeded the maximum configured length for a variable length column and was truncated.
On success, for each column described in the psetcolumns, the desired portion of the column value is set with data copied from the input buffer. The column data set may have been truncated if it exceeded the maximum length specified for a variable length column.
On failure, the cursor location is left unchanged and no column value data is updated in the copy buffer.
If any individual set column operation returns an error then the whole JetSetColumns operation will return an error. Warnings, in general, are returned in the psetcolumns->error and not in the return code from this function. However, if the last column set has a warning, then this warning will be returned from JetSetColumns itself.
Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Declared in Esent.h.