Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this set of code that is able to be compiled perfectly. However the only trouble I seem to be having is returning the value of the c_list.

c_list is able to show me the values in DBMS Output but I am not able to display it in DataGrid. I want to use this code to display the return values into a gridview in ASP.NET.

This is my code:
SQL
 CREATE OR REPLACE PACKAGE BODY GSI_GIC.PK_GSIMSGDATA AS
   PROCEDURE GSIMSG_Data(index_n IN NUMBER) IS
   CURSOR c_Data is
      SELECT  msg_ID FROM GSI_SWIFT_MSG_NEW;
   TYPE c_list is TABLE OF GSI_SWIFT_MSG_NEW.msg_ID%type;
   data_list c_list := c_list();
   counter integer :=0;
   BEGIN
    return c_list
     END GSIMSG_Data;
END PK_GSIMSGDATA;
Posted
Updated 3-Jun-15 20:10pm
v2

1 solution

Where are you stuck?

Anyway, here's[^] some example code how you bind a stored procedure to a gridview.
You would need to install an oracle client and change the connection, connectionstring , command and namespaces accordingly.
The CommandText would in your case be: cmd.CommandText = "GSI_GIC.PK_GSIMSGDATA.GSIMSG_Data";
This should be enough to get you started, come back when you have specific problems.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900