| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Java: Общие вопросы > JDBC + stored procedure |
| Автор: KostenkoSergey 20.3.2008, 17:47 |
| Есть хранимая процедура, один из инпут-параметров типа 'RECORD' (PL/SQL RECORD). Как можно сбиндить его через JDBC ? Добавлено через 8 минут и 36 секунд Тырнет вот чаво глаголит: The current (10g R2) Oracle documentation (which is online and searchable, by the way) says: PL/SQL TABLE, BOOLEAN, and RECORD Types It is not feasible for Oracle JDBC drivers to support calling arguments or return values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types. However, Oracle JDBC drivers support PL/SQL index-by table of scalar element types. As a workaround to PL/SQL RECORD, BOOLEAN, or non-scalar table types, create wrapper procedures that handle the data as types supported by JDBC. For example, to wrap a stored procedure that uses PL/SQL boolean, create a stored procedure that takes a character or number from JDBC and passes it to the original procedure as BOOLEAN or, for an output parameter, accepts a BOOLEAN argument from the original procedure and passes it as a CHAR or NUMBER to JDBC. Similarly, to wrap a stored procedure that uses PL/SQL records, create a stored procedure that handles a record in its individual components, such as CHAR and NUMBER, or in a structured object type. To wrap a stored procedure that uses PL/SQL tables, break the data into components or perhaps use Oracle collection types. See: http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/apxref.htm#sthref2105 Тобеж задача требует переделывания процедуры ... |
| Автор: LSD 20.3.2008, 18:32 |
| http://download-east.oracle.com/docs/cd/B19306_01/java.102/b14355/oraint.htm#BABBGDFA, что доступ к этим типам есть, но только не через стандартные типы JDBC, а через оракловские. |