 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Wolfgang Ott Guest
|
Posted: Tue May 17, 2005 8:42 am Post subject: Oracle JDBC problem with ARRAY |
|
|
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
|
Posted: Tue May 17, 2005 12:40 pm Post subject: Re: Oracle JDBC problem with ARRAY |
|
|
"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
|
Posted: Tue May 17, 2005 5:09 pm Post subject: Re: Oracle JDBC problem with ARRAY |
|
|
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
|
Posted: Wed May 18, 2005 2:47 am Post subject: Re: Oracle JDBC problem with ARRAY |
|
|
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 |
|
 |
|
|
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
|
|