Click or drag to resize

TaskHelper Class

Helper class to load tables from Excel, CSV or external data sources and to execute SQL statements, used from Razor scripts of report tasks
Inheritance Hierarchy
SystemObject
  Seal.HelpersTaskHelper

Namespace: Seal.Helpers
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.0.1.0+a44cd3a7f03c2bf3cdbd971a878c679e40bed08a
Syntax
C#
public class TaskHelper

The TaskHelper type exposes the following members.

Constructors
 NameDescription
Public methodTaskHelper Constructor from a report task
Top
Properties
 NameDescription
Public propertyDatabaseHelper TaskDatabaseHelper of the task, initialized with the default configuration of the task connection database type
Public propertyTask Current report task
Public propertyTaskConnection Connection of the current task
Top
Methods
 NameDescription
Public methodCheckForNewFileSource Returns true if the source file is more recent than its copy in the load folder, meaning the file must be loaded again
Public methodCreateMSSQLIndex Create (or re-create) an index on a MSSQL table
Public methodDesignMyRazorScript Sandbox method used to code, compile and debug a task Razor script within Visual Studio
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExecuteMSSQLFile Execute a .sql file
Public methodExecuteMSSQLScripts Execute .sql files located in a directory
Public methodExecuteNonQuery(String, Boolean) Execute a SQL statement on the task connection (or on all the connections of the source)
Public methodExecuteNonQuery(MetaConnection, String, String) Execute a SQL statement on a given connection. Several statements may be executed using a commands separator.
Public methodExecuteProcess Execute a process and log its output. An exception is thrown if the process writes to the standard error.
Public methodExecuteScalar(String) Execute a SQL statement on the task connection and return the first column of the first row of the result
Public methodExecuteScalar(MetaConnection, String) Execute a SQL statement on a given connection and return the first column of the first row of the result
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetDbCommand Returns a DbCommand for the task connection
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLoadDataTable(String) Load a DataTable from the task connection using a SQL SELECT statement
Public methodLoadDataTable(MetaConnection, String) Load a DataTable from a given connection using a SQL SELECT statement
Public methodLoadStringList(String) Load a list of strings from the task connection using a SQL SELECT statement (first column of the result)
Public methodLoadStringList(MetaConnection, String) Load a list of strings from a given connection using a SQL SELECT statement (first column of the result)
Public methodLoadTable Load a DataTable in the database (drop, create and insert). Returns the number of rows inserted.
Public methodLoadTableFromCSV(String, String, NullableChar, Boolean, Boolean, Encoding) Load a table from a CSV file into the database
Public methodLoadTableFromCSV(String, String, String, NullableChar, Boolean, Boolean, Encoding, Boolean) Load a table from a CSV file into the database if the file has changed since the last load (or if forceLoad is true)
Public methodLoadTableFromDataSource Load a table from a report data source into the database using a SQL SELECT statement
Public methodLoadTableFromExcel(String, String, String, Boolean, Int32, Int32, Int32, Int32, Boolean) Load a table from an Excel tab into the database. If the tab name is empty or contains a wildcard, all matching tabs are loaded. Returns the number of rows inserted.
Public methodLoadTableFromExcel(String, String, String, String, Boolean, Int32, Int32, Int32, Int32, Boolean, Boolean) Load a table from an Excel tab into the database. A start row, and/or column can be specified. An end column can be specified.
Public methodLoadTableFromExternalSource Load a table from an external connection into the database using a SQL SELECT statement. Optional check SELECT statements may be specified to skip the load if the data are identical.
Public methodLoadTablesFromExcel(String, String, String, Boolean) Load all Excel files located in a directory into tables, using the tab name as table name.
Public methodLoadTablesFromExcel(String, String, String, String, Boolean) Load tables from Excel tabs (one table per tab)
Public methodLogMessage Log a message in the report execution log
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodRefreshRepositoryEnums Refresh the dynamic enumerated lists of all the repository data sources and save the sources (a source name may be specified to filter)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also