9
use vars qw($datasource $driver $userid $password $table $outputfile $help $dbname $verbose @fields);
13
# Options to variables mapping
19
'output' => \$outputfile,
23
'verbose' => \$verbose );
38
GetOptions(\%optctl, @options) || die "Get Options Failed";
42
unless ($datasource && $userid && $table && $outputfile) {
46
$driver = $driver || "ODBC"; # ODBC is the default. Change this if you wish.
48
my $xmlout = DBIx::XML_RDB->new($datasource, $driver, $userid, $password, $dbname)
49
|| die "Failed to make new xmlout";
51
$xmlout->DoSql("SELECT * FROM $table ORDER BY 1");
55
my $output = IO::File->new(">". $outputfile);
57
print $output $xmlout->GetData;
68
Option ParamName ParamDesc
69
-sn servername Data source name
70
[-driver dbi_driver] Driver that DBI uses. Default is ODBC
71
-uid username Username
72
[-pwd password] Password
73
-table tablename Table to extract
74
-output outputfile File to place output in (excel file)
75
[-db dbname] Sybase database name
76
[-v or --verbose] Verbose output