----------------------------------------------------------------------------
----------------- 
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a
copy. 
----------------------------------------------------------------------------
-----------------
Ken,

Just a comment, have you tried using the OCI or ORA interface? instead of
going through ODBC. Since you already have SQL*Net setup (you must have for
ODBC from memory) why not try it. It should be faster than straight ODBC
plus you wont get caught by any ODBC driver issues (i know the drivers can
change things like they do accept COLUMN like '*foo*' and they have limits
on very large SQL statements).

Using ODBC will be easier if you are swapping from Access to Oracle, but if
you use a DB Abstaction layer (see PEAR, PHPLib, Metabase) this wont be an
issue either.

mn




Mark Nold
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Senior Consultant
 
Change is inevitable, except from vending machines. 



-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 11:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


I got it.

I had the table name listed as aradmin_eps_service_instructions
when in fact it should have been aradmin.eps_service_instructions (with the
dot).

I did not know this because all of the tables I had seen linked to this
before
used _ ,but the actual name (which i normally don't have priveledge to even
view) uses the .

Whee!

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


Lets start at the basics.

What is the easiest way to *make sure* that i am connecting to that oracle
db?

Anyway I can just list the tables, or something.
odbc_tables or something like that?..

-ken

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


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]

-- 
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