MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for SQL Server
SQLOLEDB bulk-copy rowsets are write-only but expose interfaces that allow the consumer to determine the structure of a Microsoft® SQL Server™ table. The following interfaces are exposed on a bulk-copy–enabled SQLOLEDB rowset:
The provider-specific properties SSPROP_FASTLOADOPTIONS, SSPROP_FASTLOADKEEPNULLS, and SSPROP_
FASTLOADKEEPIDENTITY control behaviors of a SQLOLEDB bulk-copy rowset. The properties are specified in the rgProperties member of an rgPropertySets IOpenRowset parameter member.
Property ID | Description |
SSPROP_FASTLOADKEEPIDENTITY | Column: No R/W: Read/write Type: VT_BOOL Default: VARIANT_FALSE Description: Maintains identity values supplied by the consumer. VARIANT_FALSE: Values for an identity column in the SQL Server table are generated by SQL Server. Any value bound for the column is ignored by SQLOLEDB. VARIANT_TRUE: The consumer binds an accessor providing a value for a SQL Server identity column. The identity property is not available on columns accepting NULL, so the consumer provides a unique value on each IRowsetFastLoad::Insert call. |
SSPROP_FASTLOADKEEPNULLS | Column: No R/W: Read/write Type: VT_BOOL Default: VARIANT_FALSE Description: Maintains NULL for columns with a DEFAULT constraint. Affects only SQL Server columns that accept NULL and have a DEFAULT constraint applied. VARIANT_FALSE: SQL Server inserts the default value for the column when the SQLOLEDB consumer inserts a row containing NULL for the column. VARIANT_TRUE: SQL Server inserts NULL for the column value when the SQLOLEDB consumer inserts a row containing NULL for the column. |
SSPROP_FASTLOADOPTIONS | Column: No R/W: Read/write Type: VT_BSTR Default: none Description: This property is same as the -h “hint[,...n]” option of the bcp utility. The following string(s) can be used as option(s) to be used in the bulk copying of data into a table. ORDER(column[ASC | DESC][,...n]) ROWS_PER_BATCH = bb KILOBYTES_PER_BATCH = cc TABLOCK CHECK_CONSTRAINTS |