 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Chuck Guest
|
Posted: Tue Jan 11, 2005 1:02 pm Post subject: Portable way to pass array parameter to a stored proc? |
|
|
I realized that stored proc's are written in proprietary langauges to begin
with, but I am wondering if there is a JDBC portable way to pass an argument
(in or out) that is an array of some primitive type. I've seen solutions
passing delimited strings and parsing that in the proc (yuk!). I also know
that Oracle has some array type, but this mean expliciently importing Oracle
java types into the DAO layer classes.
Is there a JDBC portable way to pass an array of primitive types into a
stored proceedure?
|
|
| Back to top |
|
 |
Angus Guest
|
Posted: Wed Jan 12, 2005 2:40 am Post subject: Re: Portable way to pass array parameter to a stored proc? |
|
|
Chuck wrote:
| Quote: |
I realized that stored proc's are written in proprietary langauges to begin
with, but I am wondering if there is a JDBC portable way to pass an argument
(in or out) that is an array of some primitive type. I've seen solutions
passing delimited strings and parsing that in the proc (yuk!). I also know
that Oracle has some array type, but this mean expliciently importing Oracle
java types into the DAO layer classes.
Is there a JDBC portable way to pass an array of primitive types into a
stored proceedure?
|
No.
Good Luck,
Avi.
|
|
| Back to top |
|
 |
Chris Guest
|
Posted: Sun Feb 06, 2005 6:26 pm Post subject: Re: Portable way to pass array parameter to a stored proc? |
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chuck wrote:
| Quote: | I realized that stored proc's are written in proprietary langauges
to begin with, but I am wondering if there is a JDBC portable way to
pass an argument
(in or out) that is an array of some primitive type. I've seen
solutions passing delimited strings and parsing that in the proc
(yuk!). I also know that Oracle has some array type, but this mean
expliciently importing Oracle java types into the DAO layer classes.
Is there a JDBC portable way to pass an array of primitive types
into a stored proceedure?
|
Hi,
I've never tried this, but there is a setArray() method in
java.sql.PreparedStatement (and therefore in
java.sql.CallableStatement). You could give it a try.
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFCBmF0gxSrXuMbw1YRAh81AJ9uldod+gRjhGSpQ9KnV5NCev+F8QCfbWlQ
NlXgIbiFnLpA8ru0sScJNq4=
=zoO2
-----END PGP SIGNATURE-----
|
|
| 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
|
|