Win32::SqlServer::DTS::Assignment - a Perl base class to represent a DTS Dynamic Properties task Assignment object
package Win32::SqlServer::DTS::Assignment::SomethingWeird; use base (Win32::SqlServer::DTS::Assignment); #and goes on defining the child class
Win32::SqlServer::DTS::Assignment is a base class that should be inherited by a specialized class that defines one type of Assignment object that is part of a DTS Dynamic Property task.
Win32::SqlServer::DTS::Assignment
This class defines some common attributes that a subclass of Win32::SqlServer::DTS::Assignment. Some methods must be override too, and are explained in the next sections.
None by default.
Instantiates a new Win32::SqlServer::DTS::Assigment object. Expects as parameter a DynamicPropertiesTaskAssignment object. Unless you want to extend the Win32::SqlServer::DTS::Assignment class, you will want to fetch Win32::SqlServer::DTS::Assignment objects using the get_properties method from Win32::SqlServer::DTS::Task::DynamicProperty class.
Win32::SqlServer::DTS::Assigment
DynamicPropertiesTaskAssignment
get_properties
Returns the type as a numeric code for a instantied object of a subclass of Win32::SqlServer::DTS::Assignment.
Returns a type as a string converted from the original numeric code using Win32::SqlServer::DTS::AssignmentTypes abstract class to make the convertion.
This method should be override by any subclass of Win32::SqlServer::DTS::Assignment. If invoked but not overrided, it will abort program execution with an error message.
Returns a Win32::SqlServer::DTS::Assignment::Destination object. See Win32::SqlServer::DTS::Assignment::Destination for more details about how to use Destination objects.
Win32::SqlServer::DTS::Assignment::Destination
A Win32::SqlServer::DTS::Assignment::Destination object is not part of the official MS SQL Server DTS API, but is easier to use and do not use Win32::OLE directly (so there are no great performance penalties).
Sets the Destination string in the assignment (in other words, it writes directly in the DTS package). To be able to invoke this method, the Win32::SqlServer::DTS::Assignment should not have invoke the kill_sibling method before, since writing the DTS package requires having the _sibling attribute defined.
kill_sibling
_sibling
The method will check such condition and will abort program execution in such cases.
Once the string is modified successfully in the package, the Win32::SqlServer::DTS::Assignment::Destination will be modified as well (a new instance will be created).
Returns all properties from an assignment object as a hash reference, having the following keys:
type
source
destination
Since the method get_source must be overrided by subclasses of Win32::SqlServer::DTS::Assignment, get_properties will fail unless invoked thru one of those subclasses.
get_source
Returns a string with the type, source and destination of an assignment. Useful for debugging or reporting.
Win32::OLE at perldoc.
perldoc
Win32::SqlServer::DTS::AssignmentFactory at perldoc.
Win32::SqlServer::DTS::Assignment::Destination and all subclasses of it 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.
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
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.