Enterprise Library - Data Block oracle返回 cursor 问题的解决[1]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

 昨天使用 Data Block 操作 oracle 返回 cursor 。期间产生了一点问题,很是郁闷,找了一下午也没有解决。早上睡不着,起来继续找。结果找到了解决的方法。其实也是怪自己没有很好的看文档。在此记录一下。以使别的同志再出现我的问题的时候,很容易的找到解决的方法。

         问题是这样的:
   我在oracle里面有这样一个过程

PROCEDURE ListAllStatic_Users (cur_Static_User OUT T_CURSOR)
    
IS
    
BEGIN
        
OPEN cur_Static_User FOR
        
SELECT * FROM Static_User ;
    
END ListAllStatic_Users;



我在程序里面如下调用:

 Database db = DatabaseFactory.CreateDatabase("oraserver");
            
string sqlCommand = "Static_UserPackage.ListAllStatic_Users";
            DBCommandWrapper dbCommandWrapper 
=db.GetStoredProcCommandWrapper(sqlCommand);
                         DataSet dsCustomers 
= db.ExecuteDataSet(dbCommandWrapper);
            DataGrid1.DataSource
=dsCstomers;
            DataGrid1.DataBind();

本文关键:Enterprise Library - Data Block oracle返回 cursor 问题的解决
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top