AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oracle JDBC problem with ARRAY

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Wolfgang Ott
Guest





PostPosted: Tue May 17, 2005 8:42 am    Post subject: Oracle JDBC problem with ARRAY Reply with quote



Hi. I've got an Oracle stored procedure with an
user defined output parameter my_array_type:
describe my_array_type;
my_array_type TABLE OF VARCHAR2(30)
I want to call the procedure with JDBC.
I register the output parameter with
cs.registerOutParameter(1, Types.ARRAY, "my_schema.MY_ARRAY_TYPE");
Then I get the error
"java.sql.SQLException: Ungültiges Namensmuster".
("illegal name pattern", I don't know the exact text in english.)
What can be wrong here?


Back to top
Bjorn Abelli
Guest





PostPosted: Tue May 17, 2005 12:40 pm    Post subject: Re: Oracle JDBC problem with ARRAY Reply with quote




"Wolfgang Ott" wrote...

Quote:
Hi. I've got an Oracle stored procedure with an
user defined output parameter my_array_type:
describe my_array_type;
my_array_type TABLE OF VARCHAR2(30)
I want to call the procedure with JDBC.
I register the output parameter with
cs.registerOutParameter(1, Types.ARRAY, "my_schema.MY_ARRAY_TYPE");
Then I get the error
"java.sql.SQLException: Ungültiges Namensmuster".
("illegal name pattern", I don't know the exact text in english.)
What can be wrong here?

The name of the defined array must be in all upper-case letters.

If "my_schema" is the default schema from your connection, I'd suggest that
you simply drop the schema-name:

cs.registerOutParameter(1, Types.ARRAY, "MY_ARRAY_TYPE");

// Bjorn A



Back to top
Wolfgang Ott
Guest





PostPosted: Tue May 17, 2005 5:09 pm    Post subject: Re: Oracle JDBC problem with ARRAY Reply with quote



Hi Bjorn,
it works now.
The point is, that the schema name (and the type name) has to be written in
capital letters,
and it must be the schema of the owner of the type.
Wolfgang


"Bjorn Abelli" <bjorn_abelli (AT) DoNotSpam (DOT) hotmail.com> schrieb im Newsbeitrag
news:4289e5cd_1 (AT) x-privat (DOT) org...
Quote:

"Wolfgang Ott" wrote...

Hi. I've got an Oracle stored procedure with an
user defined output parameter my_array_type:
describe my_array_type;
my_array_type TABLE OF VARCHAR2(30)
I want to call the procedure with JDBC.
I register the output parameter with
cs.registerOutParameter(1, Types.ARRAY, "my_schema.MY_ARRAY_TYPE");
Then I get the error
"java.sql.SQLException: Ungültiges Namensmuster".
("illegal name pattern", I don't know the exact text in english.)
What can be wrong here?

The name of the defined array must be in all upper-case letters.

If "my_schema" is the default schema from your connection, I'd suggest
that
you simply drop the schema-name:

cs.registerOutParameter(1, Types.ARRAY, "MY_ARRAY_TYPE");

// Bjorn A





Back to top
Angus
Guest





PostPosted: Wed May 18, 2005 2:47 am    Post subject: Re: Oracle JDBC problem with ARRAY Reply with quote

Wolfgang Ott wrote:
Quote:

Hi Bjorn,
it works now.
The point is, that the schema name (and the type name) has to be written in
capital letters,
and it must be the schema of the owner of the type.
Wolfgang

"Bjorn Abelli" <bjorn_abelli (AT) DoNotSpam (DOT) hotmail.com> schrieb im Newsbeitrag
news:4289e5cd_1 (AT) x-privat (DOT) org...

"Wolfgang Ott" wrote...

Hi. I've got an Oracle stored procedure with an
user defined output parameter my_array_type:
describe my_array_type;
my_array_type TABLE OF VARCHAR2(30)
I want to call the procedure with JDBC.
I register the output parameter with
cs.registerOutParameter(1, Types.ARRAY, "my_schema.MY_ARRAY_TYPE");
Then I get the error
"java.sql.SQLException: Ungültiges Namensmuster".
("illegal name pattern", I don't know the exact text in english.)
What can be wrong here?

The name of the defined array must be in all upper-case letters.

If "my_schema" is the default schema from your connection, I'd suggest
that
you simply drop the schema-name:

cs.registerOutParameter(1, Types.ARRAY, "MY_ARRAY_TYPE");

// Bjorn A



Wolfgang,
Top-posting and multi-posting. Two things that are frowned upon.
I answered this same question you posted to
"comp.databases.oracle.misc".

Have you seen the following Web pages?

http://smjg.port5.com/miniencs/misusenet.html

http://catb.org/~esr/faqs/smart-questions.html

Good Luck,
Avi.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.