kalit sikka

kalit sikka

  • NA
  • 75
  • 0

How to call store procedure in C#

Jul 16 2008 5:18 AM

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)