NAME

DTS::Assignment::Destination::GlobalVar - a subclass of DTS::Assignment::Destination for global variables

SYNOPSIS

    use warnings;
    use strict;
    use DTS::Application;
    my $xml = XML::Simple->new();
    my $config = $xml->XMLin('test-config.xml');

    my $app = DTS::Application->new($config->{credential});

    my $package = $app->get_db_package(
        { id => '', version_id => '', name => $config->{package}, package_password => '' } );

    foreach my $dyn_prop ( @{ $package->get_dynamic_props } ) {

        my $iterator = $dyn_props->get_assignments;

        while ( my $assignment = $iterator->() ) {

            my $dest = $assignment->get_destination();

		# checking all properties global variables being handled by Dynamic Properties task
            if ( $dest->changes('GlobalVar') ) {

                print $dest->get_string(), "\n";

            }

        }

    }

DESCRIPTION

DTS::Assignment::Destination::GlobalVar is a subclass of DTS::Assignment::Destination and represents the global variables as the assignments destinations of a DTS package.

The string returned by the get_string method has this format:

'Global Variables';name of the global variable;'Properties';'Value'.

EXPORT

Nothing.

METHODS

initialize

initialize method sets the destination attribute as the DTS Package global variable name.

SEE ALSO

  • DTS::Assignment at perldoc.

  • DTS::Assignment::Destination at 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.

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright (C) 2007 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.