dotConnect for QuickBooks Online Documentation
Devart.Data.QuickBooks Namespace / QuickBooksLoader Class / QuickBooksLoader Constructor / QuickBooksLoader Constructor(String)
Name of the table that will be loaded.
Example

In This Topic
    QuickBooksLoader Constructor(String)
    In This Topic
    Initializes a new instance of the QuickBooksLoader class with table name that will be loaded.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal tableName As String _
    )
    public QuickBooksLoader( 
       string tableName
    )

    Parameters

    tableName
    Name of the table that will be loaded.
    Remarks
    The constructor initializes all fields to their default values and set TableName to tableName parameter.
    Example
    The following example creates a QuickBooksLoader and sets some of its properties. Then prepares data and loads it into the table.
    public void CreateMyLoader()
    {
      // Create and open connection
      QuickBooksConnection conn = new QuickBooksConnection(
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt");
      conn.Open();
    
      // Create loader instance
      QuickBooksLoader loader = new QuickBooksLoader("loader_test");
      // Set loader properties
      loader.Connection = conn;
         
      // Prepare for loading
      loader.Open();
    
      // Set row values
      for (int i = 0; i < 10000; i++) {
        loader.SetValue(0, i);
        loader.SetValue(1, "test string");
        loader.SetValue(2, DateTime.Now);
        // Load next table row
        loader.NextRow();
      }
    
      // Flush buffer and finish loading
      loader.Close();
    }
    Public Sub CreateMyLoader()
      ' Create and open connection
      Dim conn As QuickBooksConnection = new QuickBooksConnection( _
          "Company Id=1440905870;Refresh Token=AB11590759756UCO8O6CpRQcAMP00sIANafgS8Y4RN10rpLJNM;Token Server=file://D:\\temp\\QuickBooksToken.txt")
      conn.Open()
    
      ' Create loader instance
      Dim loader As QuickBooksLoader = new QuickBooksLoader("loader_test")
      ' Set loader properties
      loader.Connection = conn
         
      ' Prepare for loading
      loader.Open()
    
      ' Set row values
      Dim i As Integer
      For i = 0 To 10000
        loader.SetValue(0, i)
        loader.SetValue(1, "test string")
        loader.SetValue(2, DateTime.Now)
        ' Load next table row
        loader.NextRow()
      next
    
      ' Flush buffer and finish loading
      loader.Close()
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also

    Reference

    QuickBooksLoader Class
    QuickBooksLoader Members
    Overload List
    Devart.Data.QuickBooks.QuickBooksLoaderColumn
    Devart.Data.QuickBooks.QuickBooksLoaderColumnCollection