dotConnect for Zoho CRM Documentation
Devart.Data.Zoho Namespace / ZohoLoader Class / ZohoLoader Constructor / ZohoLoader Constructor(String,ZohoConnection)
Name of the table that will be loaded.
A ZohoConnection object that represents the connection to a data source.
Example

ZohoLoader Constructor(String,ZohoConnection)
Initializes a new instance of the ZohoLoader class with table name that will be loaded and a ZohoConnection object.
Syntax
'Declaration
 
Public Function New( _
   ByVal tableName As String, _
   ByVal connection As ZohoConnection _
)
 

Parameters

tableName
Name of the table that will be loaded.
connection
A ZohoConnection object that represents the connection to a data source.
Remarks
Use this constructor to set TableName and Connection properties at the time of initialization.
Example
The following example creates a ZohoLoader and sets some of its properties. Then prepares data and loads it into the table.
public void CreateMyLoader()
{
  // Create and open connection
  ZohoConnection conn = new ZohoConnection(
      "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0");
  conn.Open();

  // Create loader instance
  ZohoLoader loader = new ZohoLoader("loader_test", 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 ZohoConnection = new ZohoConnection( _
      "API Version=V2;Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f3;ClientId=1000.M4FJLKYTSED90LJHUTVMKKAA432RUK;ClientSecret=89a0ed79957808814cdb20b9765423efffa767d1d0")
  conn.Open()

  ' Create loader instance
  Dim loader As ZohoLoader = new ZohoLoader("loader_test", 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

ZohoLoader Class
ZohoLoader Members
Overload List
Devart.Data.Zoho.ZohoLoaderColumn
Devart.Data.Zoho.ZohoLoaderColumnCollection