Re: Portable way to pass array parameter to a stored proc?
From: Chris (chris2k01_at_hotmail.com)
Date: 02/06/05
- Next message: Chris: "Re: ID of last insert from DB2 table"
- Previous message: Dimitri Maziuk: "Re: Is perl better? :((("
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 06 Feb 2005 18:26:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chuck wrote:
> 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-----
- Next message: Chris: "Re: ID of last insert from DB2 table"
- Previous message: Dimitri Maziuk: "Re: Is perl better? :((("
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|