dotConnect for Magento Documentation
In This Topic
    Bulk Data Loading
    In This Topic
    Bulk Data Loading
    dotConnect for Magento support@devart.com

    Bulk Data Loading

    MagentoLoader component is used for bulk uploading a large number of records to Magento.

    To start uploading data, create a MagentoLoader component. Then you may tweak its BatchSize property. BatchSize property determines a maximal number of records in a batch. After this you need to specify columns to load data. You may do it either manually, using the Columns property, or you may use the CreateColumns method to retrieve table columns information from the table specified in the TableName property. Then call the Open method and use the SetValue method to set values for the row fields. To switch to the next row, call the NextRow method.

    After you have finished loading data, call the Close method. The server actually starts processing the data and insert them to the table only after this method is called. After the data processing starts, the Close method queries the state of all batches each UpdateStatusInterval interval.

    The following example demonstrates using the MagentoLoader class.

    [C#]

    
    

    [Visual Basic]

    
    

    After calling the Close method you can retrieve IDs of the inserted records as an array of strings with the GetIDs method.