Import Method in Class SMS_SoftwareProductCompliance
Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2
The Import Windows Management Instrumentation (WMI) class method, in Configuration Manager, overwrites any matching records of program-compliance data in the database. It also returns the number of records that were imported.
Note
The filter process is case-insensitive. Do not include either filter (SourceFilter or TypeFilter) if you want to import all the compliance data.
UInt32 Import(
String ComplianceData,
String SourceFilter,
String TypeFilter,
Boolean ReportErrors,
UInt32 TotalRecordsProcessed
);
Parameters
ComplianceData
Data type: StringQualifiers: [in]
Tab-delimited compliance data. The data is passed as a null-terminated string. Each record terminates with a carriage return and line feed character.
SourceFilter
Data type: StringQualifiers: [in, optional]
Source filter used by the method to import only those records that match the source value, limiting them to a single data source.
TypeFilter
Data type: StringQualifiers: [in, optional]
If a compliance type, such as "Year 2000", is set in TypeFilter,the method imports only those records matching the compliance Type property.
ReportErrors
Data type: BooleanQualifiers: [in, optional]
true, by default, if the import process stops on the first error and performs a rollback on the database, that is, removes all inserted and updated compliance data. If this parameter is set to false, the import process continues when errors occur.
TotalRecordsProcessed
Data type: UInt32Qualifiers: [out]
Total number of records imported, valid or invalid.
Return Values
A UInt32 data type that indicates the number of valid records imported.
The method sets the ErrorCode property of SMS_ExtendedStatus Class to 0x40441218 (E_INT_READ_LINE | R_FIELDNO) when the method is unable to process a record in the file. The ObjectInfo property identifies the record number (excluding blank lines) that is in error. The CauseInfo property contains a number representing the field in the record that caused the error. The field numbers start from zero.
Requirements
Runtime Requirements
For more information, see Configuration Manager Server Runtime Requirements.
Development Requirements
For more information, see Configuration Manager Server Development Requirements.