本文介绍了Oracle中的返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这组代码,可以完美地进行编译.但是,我似乎遇到的唯一麻烦是返回c_list的值. c_list可以向我显示DBMS输出中的值,但不能在DataGrid中显示它.我想使用此代码将返回值显示到ASP.NET的gridview中. 这是我的代码:
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:
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;推荐答案
您被困在哪里? 无论如何,在此处 [ ^ ]一些示例代码,您如何将存储过程绑定到gridview. 您将需要安装oracle客户端并相应地更改连接,connectionstring,命令和名称空间. 在您的情况下,CommandText为:cmd.CommandText = "GSI_GIC.PK_GSIMSGDATA.GSIMSG_Data"; 这应该足以让您入门,遇到特定问题时再回来. 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.
更多推荐
Oracle中的返回值
发布评论