Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Simply-
how do I get table info with the DBI using a desc, or similar function? If I issue a desc TABLE_NAME through the DBI, oracle throws an error, which is odd because at a SQL prompt this command has no problems.....
Thoughts?
Cheers-
John
here is my non-funtional code:(which works with a regular query, 'select sysdate from dual')
my $select_x = "describe $table_name"; $dbh = get_connection($me, $mepw); $sth = $dbh->prepare($select_x); my $rc = $sth->execute; while (my (@rows) = $sth->fetchrow_array) { print "$rows[0] -- $rows[1]\n"; }
2001-03-03 Edit by Corion : Added CODE tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI + Oracle describe problem
by PsychoSpunk (Hermit) on Feb 22, 2001 at 05:02 UTC | |
|
Re: DBI + Oracle describe problem
by aardvark (Pilgrim) on Feb 22, 2001 at 05:18 UTC | |
|
(dkubb) Re: (2) Database Independant DESC
by dkubb (Deacon) on Feb 22, 2001 at 11:40 UTC | |
|
Re: DBI + Oracle describe problem
by unixwzrd (Beadle) on Feb 22, 2001 at 14:08 UTC |