Oracle中的返回值

编程入门 行业动态 更新时间:2024-10-23 12:32:12
本文介绍了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中的返回值

本文发布于:2023-06-04 19:09:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/503354.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:返回值   Oracle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!