Alceu Rodrigues de Freitas Junior > Win32-SqlServer-DTS > Win32::SqlServer::DTS::Task::ExecutePackage

Download:
Win32-SqlServer-DTS-0.10.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Win32::SqlServer::DTS::Task::ExecutePackage - a subclass of Win32::SqlServer::DTS::Task to represent a DTSExecutePackageTask object

SYNOPSIS ^

    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 = '';

        }

    }

DESCRIPTION ^

Win32::SqlServer::DTS::Task::ExecutePackage class represents a DTS ExecutePackage task.

EXPORT

Nothing.

METHODS

All methods from Win32::SqlServer::DTS::Task are also available.

new

Overrides the superclass Win32::SqlServer::DTS::Task new method by defining the following attributes:

get_input_vars

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

get_ref_input_vars

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).

uses_repository

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.

use_trusted

Returns true or false whether the Win32::SqlServer::DTS::Task::ExecutePackage object uses a trusted connection to authenticate against a SQL Server.

to_string

Overrides superclass Win32::SqlServer::DTS::Task method to_string to return strings for all defined attributes of the object.

get_package_id

Returns the PackageID property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_package_name

Returns the PackageName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_package_password

Returns the PackagePassword property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_repository_database_name

Returns the RepositoryDatabaseName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_server_name

Returns the ServerName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_server_password

Returns the ServerName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_server_username

Returns the ServerUserName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

get_file_name

Returns the FileName property as a string from a Win32::SqlServer::DTS::Task::ExecutePackage task.

SEE ALSO ^

AUTHOR ^

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org<gt>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: