![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i try to use the setArray method of postgres (8.3) JDBC driver to send data to a function. I hope I'm not off topic here with this problem. |
|
In my code I have some java.lang.Double-Arrays whitch I must convert in that way, that I can use them in the prepare-statement context with setArray. I found some information that I can convert the double Array to a string list like "..array[1,2,3,....]" but I have around 500 elements in 5 Arrays and I would like to send them without string reprensation How can I do that? |
#3
| |||
| |||
|
|
Philipp Kraus wrote: i try to use the setArray method of postgres (8.3) JDBC driver to send data to a function. I hope I'm not off topic here with this problem. Nothing PostgreSQL-related is off-topic here, but the JDBC mailing list has more knowledgeable people reading it. In my code I have some java.lang.Double-Arrays whitch I must convert in that way, that I can use them in the prepare-statement context with setArray. I found some information that I can convert the double Array to a string list like "..array[1,2,3,....]" but I have around 500 elements in 5 Arrays and I would like to send them without string reprensation How can I do that? I found the following thread in the archives: http://archives.postgresql.org/pgsql...2/msg00040.php The two options suggested are: - Implement the java.sql.Array interface with your types. - Use the JDBC4 driver (requires Java 6) and use the java.sql.Connection.createArrayOf() method. |
![]() |
| Thread Tools | |
| Display Modes | |
| |