Orac
view release on metacpan or search on metacpan
orac_Shell.pm view on Meta::CPAN
}
}
# Get a file from the operating system.
sub load_query {
}
# Save a file to an operating system.
sub save_query {
}
sub red {
$auto_ball->configure( -image => $color_ball{red} );
}
sub green {
$auto_ball->configure( -image => $color_ball{green} );
}
sub tba {
my $self = shift;
print RSLT_TXT "Work in progress ...\n";
0;
}
sub execute_sql {
my $self = shift;
$dbiwd->Busy;
my $statement = $entry_txt->get("1.0", 'end' );
chomp $statement;
$statement =~ s:[/;](\s)+$::; # Replace the last / with nothing.
my $dbh = $self->{dbh};
unless($dbh) {
$dbistatus = "Database handle not openned!";
return;
}
my $sth = $self->do_prepare( $statement );
$sth->execute;
# print RSLT_TXT "Number of fields: " . $sth->{NUM_OF_FIELDS} . "\n";
#
# Dump return set to a grid.
#
$dbh->{neat_maxlen} = 40004;
my $class = DBI::Format->formatter($opt_dis_grid);
my $r = $class->new($self);
$r->header($sth, \*RSLT_TXT, ",");
my $row;
while( $row = $sth->fetchrow_arrayref() ) {
$r->row($row, \*RSLT_TXT, "," );
}
$r->trailer(\*RSLT_TXT);
$sth->finish;
$dbiwd->Unbusy;
}
1;
( run in 1.717 second using v1.01-cache-2.11-cpan-39bf76dae61 )