Вниз
Скачать: CL | DM;

Чтение курсора из Хранимой процедуры ORACLE в BDE/ADO   Найти похожие ветки 

← →
axelrodm   (2003-09-18 12:01) [0]

Есть ХР процедура GetMatrix

CREATE OR REPLACE PACKAGE ManageRecognition AS
TYPE tMatrixValues IS REF CURSOR return MATRIX%ROWTYPE;
Procedure GetMatrix(MatrixVal OUT tMatrixValues);
END ManageRecognition;
/
CREATE OR REPLACE PACKAGE BODY ManageRecognition AS
Procedure GetMatrix(MatrixVal OUT tMatrixValues) is
begin
OPEN MatrixVal for
SELECT * from MATRIX
order by MATRIX_ID;
end;
end ManageRecognition;
/

Как к ней обратиться из клиента DELPHI и работать с курсором
MatrixVal


← →
DenK_vrtz ©   (2003-09-18 13:27) [1]

StoredProc чем не нравится?
Только почему процедура, а не функция?


← →
axelrodm   (2003-09-18 14:25) [2]

StoredProc выполняет, а мне нужно получить МНОГО СТРОК
из таблицы MATRIX. Функция в ORACLE может возвратить
лишь одно значение (число, строку)

Михаил


← →
axelrodm   (2003-09-18 14:45) [3]

Привожу цитату из ORACLE:
To be callable from SQL expressions, a user-defined PL/SQL function must meet the following basic requirements:

It must be a stored function, not a function defined within a PL/SQL block or subprogram.

It must be a row function, not a column (group) function; in other words, it cannot take an entire column of data as its argument.

All its formal parameters must be IN parameters; none can be an OUT or IN OUT parameter.

The datatypes of its formal parameters must be Oracle Server internal types, such as CHAR, DATE, or NUMBER, not PL/SQL types, such as BOOLEAN, RECORD, or TABLE.

Its return type (the datatype of its result value) must be an Oracle Server internal type.

For example, the following stored function meets the basic requirements:


← →
DenK_vrtz ©   (2003-09-18 15:07) [4]

axelrodm (18.09.03 14:25) [2] , ты гонишь!!! :-)
Я работаю с функциями, которые возвращают курсор, через StoredProc. Проблем никаких!



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
14-27715
Fenik
2003-09-21 17:13
2003.10.09
Безопасность.


1-27479
777
2003-09-26 21:53
2003.10.09
Action


1-27553
Dionis
2003-09-29 16:29
2003.10.09
Цвет пикселя


3-27355
DenK_vrtz
2003-09-19 16:02
2003.10.09
Работа с dbms_output


9-27299
GL Forever!
2003-01-25 17:18
2003.10.09
Ориентация меша в пространстве (TMesh)




   Наверх