Win32::SqlServer::DTS::Task::ExecutePackage - a subclass of Win32::SqlServer::DTS::Task to represent a DTSExecutePackageTask object
use warnings; use strict; use Win32::SqlServer::DTS::Application; use Test::More; use XML::Simple; my $xml = XML::Simple->new(); my $config = $xml->XMLin('test-config.xml'); my $app = Win32::SqlServer::DTS::Application->new($config->{credential}); my $package = $app->get_db_package({ id => '', version_id => '', name => $config->{package}, package_password => '' } ); my $total_exec_pkgs = $package->count_execute_pkgs; plan tests => $total_exec_pkgs; SKIP: { skip 'The package has no Execute Package task', 1 unless ( $total_exec_pkgs > 0 ); my $package_name; my $iterator = $package->get_execute_pkgs(); while ( my $execute_pkg = $iterator->() ) { $package_name = 'Execute Package task "' . $execute_pkg->get_name() . '"'; is( $execute_pkg->get_package_id(), '', "$package_name must have Package ID empty" ); $package_name = ''; } }
Win32::SqlServer::DTS::Task::ExecutePackage class represents a DTS ExecutePackage task.
Win32::SqlServer::DTS::Task::ExecutePackage
Nothing.
All methods from Win32::SqlServer::DTS::Task are also available.
Overrides the superclass Win32::SqlServer::DTS::Task new method by defining the following attributes:
Win32::SqlServer::DTS::Task
new
package_id
package_name
package_password
repository_database_name
server_name
server_password
server_username
use_repository
use_trusted_connection
file_name
input_global_variable_names
Returns the InputGlobalVariableNames property from a Win32::SqlServer::DTS::Task::ExecutePackage task, which is a string containing each global variable name separated by a semicolon character (;), optionally double-quoted or single-quoted list. Quoting is required only when the name contains an embedded delimiter
InputGlobalVariableNames
Same as get_input_vars, but returns an array reference instead of a string. Single or double quotes are removed too (but only those ones at the start and end of the global variable name).
get_input_vars
Returns true or false depending if the Win32::SqlServer::DTS::Task::ExecutePackage object uses MS SQL Server 2000 Meta Data Services. Same thing as UseRepository property of DTS ExecutePackage task.
UseRepository
Returns true or false whether the Win32::SqlServer::DTS::Task::ExecutePackage object uses a trusted connection to authenticate against a SQL Server.
Overrides superclass Win32::SqlServer::DTS::Task method to_string to return strings for all defined attributes of the object.
to_string
Returns the PackageID property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
PackageID
Returns the PackageName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
PackageName
Returns the PackagePassword property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
PackagePassword
Returns the RepositoryDatabaseName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
RepositoryDatabaseName
Returns the ServerName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
ServerName
Returns the ServerUserName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
ServerUserName
Returns the FileName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.
FileName
Win32::SqlServer::DTS::Task superclass from where Win32::SqlServer::DTS::Task::ExecutePackage inherits.
Win32::OLE at Active Perl perldoc.
MSDN on Microsoft website and MS SQL Server 2000 Books Online are a reference about using DTS' object hierarchy, but one will need to convert examples written in VBScript to Perl code.
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org<gt>
Copyright (C) 2006 by Alceu Rodrigues de Freitas Junior
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Win32::SqlServer::DTS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::SqlServer::DTS
CPAN shell
perl -MCPAN -e shell install Win32::SqlServer::DTS
For more information on module installation, please visit the detailed CPAN module installation guide.