Dear all,
I have a problem. I have installed "Indigo Perl". I have used the
following commands to install DBI for Oracle.
Ipm install DDL-Oracle-1.11
This thing installed oracle.pm along with the other files. Then I wrote
the following code in a simple text file and saved it as "abc.pl". The
code is as follows.
#!perl -w
use DBI;
use DDL::Oracle;
my $dbh = DBI->connect(
"dbi:Oracle:dbname",
"cbs",
"pwd",
{
PrintError => 0,
RaiseError => 1
}
);
# Use default resize and schema options.
# query default DBA_xxx tables (could use USER_xxx for non-DBA types)
DDL::Oracle->configure(
dbh => $dbh,
);
# Create a list of one or more objects
my $sth = $dbh->prepare(
"SELECT
csr
FROM
tblcsr
WHERE
csrid = 1 -- your mileage may vary
"
);
$sth->execute;
my $list = $sth->fetchall_arrayref;
my $obj = DDL::Oracle->new(
type => 'table',
list => $list, );
);
my $ddl = $obj->create; # or $obj->resize; or $obj->drop; etc.
print $ddl; # Use STDOUT so user can redirect to desired file.
# Here's another example, this time for type 'components'. This type
# differs from the norm, because it has no owner and no name.
my $obj = DDL::Oracle->new(
type => 'components',
list => [[ 'no owner','no name' ]]
);
my $ddl = $obj->create;
print $ddl;
It gives me this error
Premature end of script headers
And sometimes it says that file not found or not a proper exe etc
Please help me out if u can or atleast let me know of any link for
indigo Perl help (not indigostar.com)
Regards,
Agha Jawad