RE: :Oracle problems
- From: john.moon@xxxxxxxxxxxxx (John Moon)
- Date: Tue, 31 May 2005 15:34:11 -0400
Subject: DBD::Oracle problems
All,
I am getting the following error while trying to use DBD::Oracle:
DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD
ERROR: OCIStmtExecute) [for Statement "describe ALL_USERS"] at
../oracleTest.pl line 69.
I have tested the connection manually with sqlplus, and all is good there.
I have also run some select statements with the DBD::Oracle driver that
DID work. So all is good there.
HOWEVER what is wrong with this describe statement and why do I get the
error above???
my $sth = $dbh->prepare(qq{describe ALL_USERS});
$sth->execute;
A WORKING snippet is:
my $sth = $dbh->prepare(qq{select count(USERNAME) from ALL_USERS});
and happens to return 635 as the result as expected.
So I believe that I understand how to use the driver but there is
obviously something about the describe that is different.
I don't think "describe" is an SQL command...
Try " select column_name from ALL_TAB_COLUMNS
where table_name = 'ALL_USERS'"
jwm
.
- Prev by Date: DBD::Oracle problems
- Next by Date: Re: DBD::Oracle problems
- Previous by thread: DBD::Oracle problems
- Next by thread: RE: :Oracle problems
- Index(es):
Relevant Pages
|