I only mentioned the part about the access, just to prove that I know i have
a select
statement working with an ODBC source. 

I know that I am connecting to the Oracle database, because if i put in a
bogus user/pass
i get an error stating so, when I supply the correct credentials I get no
errors.

So that just leaves something to do with possibly the table names.
The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS
by my count that is 32 characters. That could be a problem. Any way around
that, or
to alias a name to that? (Mind you, i don't have access to that database to
change
the table names). I can only query from it.


The exact offending line number that is returned is 37.

36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where
ATMID = 'PN2000'";
37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

-ken


-----Original Message-----
From: Greig, Euan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I haven't used Oracle with ODBC, but nothing leaps out at me from your code.
Some comments/ideas: 

The full meaning of error 0972 is that the name of a schema object (table,
view, username etc) is too long (longer than 30 characters, maybe more for
Oracle 8). The query statement you are using looks OK. How about displaying
$username and $password? And have you isolated which line is causing the
error?

The relevance of ' and " I suppose is this. By default Oracle is not case
sensitive about the names of database objects, but it is if when you create
them you enclose the name in double quotes. For instance if you simply say
'create table euan', then you will be able to access it with  'select * from
euan', 'select * from EUAN', 'select * from Euan' etc. But if you say
'create table "euan"', then you will forever have to say 'select * from
"euan"'.

Problems can indeed arise when interfacing between Access and Oracle,
because I believe that Access is case sensitive by default, and Oracle
programmers tend not to expect this. But none of this seems very applicable
to your case... or is it?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; [EMAIL PROTECTED]
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]


I'm getting this message when i try to run a query on an Oracle database
thru ODBC.
I can connect to the database just fine. 

here is the code i'm trying to use.

$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to
connect to oracle aradmin database");
$si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS";
$si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

the result i get is:
Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972:
identifier is too long., SQL state 37000 in SQLExecDirect in c:\program
files\apache group\apache\htdocs\odbc_test.php3 on line 34

i'm connecting to an MSAccess database thru odbc just fine and sending a 
similar query, it works just fine.
do i need to do something different because it is an oracle database?

(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on
the right track?

thanks!
-ken


**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to