我用函数递归取得一组数据(表类型),该怎么返回到程序中啊?游标好象访问不了表类型,直接返回表类型,程序又不认得,怎么解决这问题?我用的程序语言是c#
解决方案 »
- dbca 出现ORA_01031:insufficient privileges
- 请教: 系统表 AUD$ 的 USERHOST 中出现的怪字符
- 请教一个记录合并去重的方法!
- oracle长时间使用odbc连接不上!但oem和sqlplus却能正常使用!郁闷中!
- 刚刚写的一个函数,test后没有问题,但怎么不能用在sql中???~~~~~~~~~~~~~~~~~~
- PHP如何连接ORACLE!着急!
- 使用cursor?还是不使用Cursor?这是一个问题。高分望高手相助
- 请求帮助。急!
- oracle中是那个方法知道用户的退出啊是不是sys.logoff_user
- oracle 数据库启动问题
- 关于update中选择多表的问题
- 救命啊!还是clob的问题!
nodeid number) return BASE_TABLE.NodeTable
is
ParentId number;
T_ReTable BASE_TABLE.NodeTable;--这里是包头定义的表类型
TempTable BASE_TABLE.NodeTable;
i number := 0;
begin
ParentId := GetOneParentId(nodeid);--这里是取得一个父节点的函数
T_ReTable(i):=ParentId;
i:=i+1;
if ParentId > 0 then
TempTable := GetAllParentsId(ParentId);
for j in TempTable.first..TempTable.last loop
T_ReTable(i):=TempTable(j);
i:=i+1;
end loop;
end if;
return T_ReTable;
end;在包体中调用到这个函数 然后返回值
==========>返回DBテーブルのstyle
----------------------
Imports System.Data.OleDb
----------------------
Dim dbConnect As OleDbConnection '接続変数
Dim strTemp As String
Dim odcTemp As OleDbConnection 'DB接続用Connection変数
Dim strDBConStr As String 'DB接続用文字列 'DB接続用文字列を取得する。
strDBConStr = "Provider=" & config.AppSettings("Provider")
strDBConStr = strDBConStr & ";Persist Security Info=" & _
config.AppSettings("PersistSecurityInfo")
strDBConStr = strDBConStr & ";User ID=" & _
config.AppSettings("UserID")
strDBConStr = strDBConStr & ";Password=" & _
config.AppSettings("Password")
strDBConStr = strDBConStr & ";Data Source=" & _
config.AppSettings("DataSource")
strDBConStr = strDBConStr & ";Extended Properties=" & _
config.AppSettings("ExtendedProperties") 'DB接続
odcTemp = New OleDbConnection(strDBConStr)
odcTemp.Open() 'DB接続Return
dbConnect = odcTemp
Dim dt As DataTable = dbConnect.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, New Object() {Nothing, Nothing, 表1})
objDBOpt.closeDB()
parameters.Direction=ParameterDirection.Output;
OracleParameter parameters1 =new OracleParameter("nodeid",OracleType.Number);
parameters1.Direction=ParameterDirection.Input;
parameters1.Value=20;
ret=db.ExecQueryBySP("TREE_VIEW_PAC.Select_getAllChildNodeId",ReturnType.DataSet,parameters,parameters1);
ds=ret.DataSet;
grd.DataSource=ds;
grd.DataBind();你的我有点没看明白,这是我的调用代码!帮忙看看 谢谢!procedure Select_getAllChildNodeId(
node_table_cursor out BASE_CURSOR.T_CURSOR,
nodeid in tree_view.tree_id%Type
)
is
node_table BASE_TABLE.NodeTable;
begin
node_table:=GetAllChildId(nodeid);
open node_table_cursor for
select * from node_table;
end Select_getAllChildNodeId;这是包体存储过程代码