sql server - Are packages the only way to return data from an Oracle db? -



sql server - Are packages the only way to return data from an Oracle db? -

i've worked sql server far , i'm moving oracle new project.

i'm trying create proc homecoming info .net app. way got work using packages this:

create or replace bundle getalldepartments type t_cursor ref cursor; procedure p_getalldepartments ( cur_result out t_cursor ); end getalldepartments; create or replace bundle body getalldepartments procedure p_getalldepartments ( cur_result out t_cursor ) begin open cur_result select * departments; end p_getalldepartments; end getalldepartments;

is way go oracle?, can't create proc , phone call directly? thanks

assuming have supported version of oracle, should able like

create or replace procedure get_all_departments( p_result out sys_refcursor ) begin open p_result select * departments; end get_all_departments;

that said, improve off organization standpoint using packages collect procedures related things. in case, example, create sense have bundle had procedures dealt departments (i.e. create_department, delete_department, etc.).

and general stylistic standpoint, more mutual in oracle create view implements whatever logic set in stored procedure , query view rather creating stored procedure query.

sql-server oracle stored-procedures ado.net

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -