RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]

From: Date: Thu, 22 Mar 2001 15:16:08 +0000
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
Groups: php.general 
Request: Send a blank email to php-general+get-45127@lists.php.net to get a copy of this message
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:KBrooks@netEPS.com] Sent: Thursday, March 22, 2001 9:52 AM To: php-general@lists.php.net 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:KBrooks@netEPS.com] Sent: Thursday, March 22, 2001 9:32 AM To: php-general@lists.php.net 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:Euan.Greig@brann.com] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: php-general@lists.php.net 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:KBrooks@netEPS.com] Sent: 22 March 2001 14:04 To: 'Greig, Euan'; php-general@lists.php.net 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#45127) next »