Re: passing array as parameters to PrepareStatement or callable
От | Kris Jurka |
---|---|
Тема | Re: passing array as parameters to PrepareStatement or callable |
Дата | |
Msg-id | Pine.BSO.4.61.0511130347040.6118@leary.csoft.net обсуждение исходный текст |
Ответ на | passing array as parameters to PrepareStatement or callable statement.[setObject() or setArray()] (Assad Jarrahian <jarraa@gmail.com>) |
Ответы |
Re: passing array as parameters to PrepareStatement or callable statement.[setObject() or setArray()]
|
Список | pgsql-jdbc |
On Sat, 12 Nov 2005, Assad Jarrahian wrote: > Hello all, > my apologies if this question has been asked before. I looked > through the archives could not find the relevant info (if I overlooked > something, sorry). > > int[] intarray = new int[1]; > getAssociatedLMs.setObject(1, intarray, java.sql.Types.ARRAY); > //getAssociatedLM's is a callable statement ("{call getLMs(?,?) } "); > > so I get a compilation error saying > org.postgresql.util.PSQLException: Cannot cast an instance of [I to > type Types.ARRAY Currently the driver only supports passing a specific implementation of java.sql.Array to setObject (and setArray). Other people have posted helper classes to transform some specific java array types to java.sql.Array, but these have not been generalized and added to the driver. Kris Jurka
В списке pgsql-jdbc по дате отправления: