2
Answers

How to call store procedure in C#

kalit sikka

kalit sikka

16y
6.4k
1

Definition of store procedure:

CREATE OR REPLACE PACKAGE BODY packperson
         AS

         PROCEDURE allperson
                     (ssn    OUT     tssn,
                      fname  OUT     tfname,
                      lname  OUT     tlname)
         IS
             CURSOR person_cur IS
                     SELECT ssn, fname, lname
                     FROM person;

             percount NUMBER DEFAULT 1;

         BEGIN
             FOR singleperson IN person_cur
             LOOP
                     ssn(percount) := singleperson.ssn;
                     fname(percount) := singleperson.fname;
                     lname(percount) := singleperson.lname;
                     percount := percount + 1;
             END LOOP;
         END;

         END;
         /

I want to call this procedure in code to fill a datagrid.

Please provide me a code snippet for this.

Thanks

Answers (2)