ExactTargetLoader Constructor(String,ExactTargetConnection)
Initializes a new instance of the
ExactTargetLoader class with table name that will be loaded and a
ExactTargetConnection object.
The following example creates a
ExactTargetLoader and sets some of its properties. Then prepares data and loads it into the table.
public void CreateMyLoader()
{
// Create and open connection
ExactTargetConnection conn = new ExactTargetConnection(
"user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;");
conn.Open();
// Create loader instance
ExactTargetLoader loader = new ExactTargetLoader("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 ExactTargetConnection = new ExactTargetConnection( _
"user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;")
conn.Open()
' Create loader instance
Dim loader As ExactTargetLoader = new ExactTargetLoader("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
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
Reference
ExactTargetLoader Class
ExactTargetLoader Members
Overload List
Devart.Data.ExactTarget.ExactTargetLoaderColumn
Devart.Data.ExactTarget.ExactTargetLoaderColumnCollection