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 

Portable way to pass array parameter to a stored proc?

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





PostPosted: Tue Jan 11, 2005 1:02 pm    Post subject: Portable way to pass array parameter to a stored proc? Reply with 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?


Back to top
Angus
Guest





PostPosted: Wed Jan 12, 2005 2:40 am    Post subject: Re: Portable way to pass array parameter to a stored proc? Reply with quote



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





PostPosted: Sun Feb 06, 2005 6:26 pm    Post subject: Re: Portable way to pass array parameter to a stored proc? Reply with quote



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