helmis
Member²
hi i must use this procedure from oracle
How can I send data from delphi ?
Thanks
Code:
create table TESTER
(
FIRST_NAME VARCHAR2(250),
LAST_NAME VARCHAR2(250),
COMPANY VARCHAR2(250)
);
/
create or replace package tester1 is
TYPE sample_record is RECORD( NAMES VARCHAR2(24), LASTS VARCHAR2(250), COUNTRY VARCHAR2(20));
TYPE sample_table is table of sample_record;
type SYS_REFCURSOR is ref cursor return sample_record;
procedure so_p_save_tester(grd_cur in sample_table);
end tester1;
/
create or replace package body tester1 is
procedure so_p_save_tester(grd_cur in sample_table) is
i integer;
begin
--open grd_cur;
FOR i in grd_cur.first .. grd_cur.last
loop
insert into tester
(first_name, last_name, company)
values
(grd_cur(i).NAMES, grd_cur(i).LASTS,grd_cur(i).COUNTRY);
end loop;
on exception rollback;
commit;
end;
end tester1;
Thanks