2.5.3.2.3 DTS Bulk Load From XML Task
The class ID for the DTS Bulk Load From XML task is (68D98B6F-5E6A-11D4-B53F-00C04FA120B1). The ProgID for the DTS Bulk Load From XML task is "DTSTask.DTSSQLXMLBulkLoadTask".
The DTS Bulk Load From XML task uses the same mechanism as the PersistStorage structure to store its persistent properties, except that the stream that is used to persist the properties of the DTS Bulk Load From XML task is named "Contents".
The persistent property set for the DTS Bulk Load From XML task contains the following items.
Property |
Type |
Description |
---|---|---|
Name |
BSTR |
Specifies the name of the task. |
Description |
BSTR |
Specifies the description of the task or lineage. |
ConnectionMethod |
LONG |
Specifies the connection method. For more information, see the following table for the ConnectionMethod property. |
ServerName |
BSTR |
Specifies the server name. For more information, see the following table for the ServerName property. |
DatabaseName |
BSTR |
Specifies the database name. For more information, see the following table for the DatabaseName property. |
UseTrustedConnection |
BOOL |
Specifies whether to use a trusted connection.<30> |
UserName |
BSTR |
Specifies the user ID or user name to use when making a connection. |
Password |
BSTR |
Specifies the password to use when making a connection. |
ConnectionString |
BSTR |
Used where a connection string is specified in ConnectionMethod. |
ConnectionID |
LONG |
Specifies the ID of the connection to use where a connection object is specified in ConnectionMethod. |
KeepIdentity |
BOOL |
Specifies whether to keep identity values when importing data. If TRUE, identity values are kept when importing data. If FALSE, identity values are not kept when importing data. |
KeepNulls |
BOOL |
Specifies whether nulls are to be kept or filled with defaults. If TRUE, nulls are kept. If FALSE, nulls are filled with defaults. |
CheckConstraints |
BOOL |
Specifies whether data constraints are kept before inserting data. If TRUE, data constraints are kept before inserting data. If FALSE, data constraints are not kept before inserting data. |
ForceTableLock |
BOOL |
Specifies whether the table is to be locked for insert. If TRUE, the table is locked for insert. If FALSE, the table is not locked for insert. |
PerformBulkLoad |
BOOL |
Specifies whether a bulk load is to be performed. |
XMLFragment |
BOOL |
Specifies whether the source data is an XML fragment. |
PerformSchemaGeneration |
BOOL |
Specifies whether to create the required tables before performing a bulk load. |
DropCreateTables |
BOOL |
Specifies whether already-existing tables are to be dropped and re-created. |
UseID |
BOOL |
Specifies whether the ID type attribute in the mapping schema can be used in creating a primary key constraint when the table is created. |
Options |
LONG |
This bit is not used. |
UseTransaction<31> |
BOOL |
Specifies whether the bulk load is to be done as a transaction, which will roll back if the load fails. |
ErrorLogFile |
BSTR |
Specifies the file name into which errors and messages are to be logged. If the string is empty, no logging takes place. |
SchemaFile |
BSTR |
Specifies the path to an XSD schema file. |
DataStream |
BSTR |
Specifies the path to an XML data stream. |
DataSourceFormat |
LONG |
Specifies the format of the source data. For more information, see the following table for the DataSourceFormat property. |
BulkLoadEngine |
LONG |
Specifies the bulk load engine. For more information, see the following table for the BulkLoadEngine property. |
The ConnectionMethod property can have one of the values in the following table.
Name |
Value |
Description |
---|---|---|
Parameters |
0x00000100 |
Specifies to use connection parameters. |
String |
0x00000001 |
Specifies to use a connection string. |
DTSObject |
0x00000002 |
Specifies to use a DTS connection object. |
The BulkLoadEngine property can have one of the values in the following table.
Type |
Value |
Description |
---|---|---|
SQLXMLObject |
0x00000001 |
Specifies to use the SQLXMLBulkLoad task object. |
SQLOLEDB |
0x00000002 |
Specifies to use the XML Bulk Load extension of OLE DB. |
The DataSourceFormat property can have one of the values in the following table.
Type |
Value |
Description |
---|---|---|
Text |
0x00000001 |
Specifies that the data source is text. |
Stream |
0x00000002 |
Specifies that the data source is a stream. |