#!/usr/bin/perl use DBI; require "/usr/logins/usercgi/oracle_setup.pl"; use CGI; $cgi=new CGI(\*STDIN); $userid = $cgi->param('userid'); $passwd = $cgi->param('passwd'); print "Content-type: text/html\n\n

Ihre Tabellen

\n"; $dbh = DBI->connect('DBI:Oracle:', "$userid", "$passwd"); $sth=$dbh->prepare("select tname from tab"); $sth->execute; $sth->bind_columns(undef,\$tname); while (@row=$sth->fetchrow_array) { print "

$tname
\n"; $sth2 = $dbh->prepare("select column_name, data_type, data_length from user_tab_columns where table_name = \'$tname\'"); $sth2->execute; $sth2->bind_columns(undef,\$cname,\$dtype,\$dlength); print "\n"; while (@row2=$sth2->fetchrow_array) { print "\n"; } print "
$cname$dtype($dlength)
\n"; print "

\n"; print " * from $tname\n"; print "\n"; print "\n"; print "\n"; print "
\n"; $sth2->finish; } $sth->finish; $dbh->disconnect;