如何在C#中的Oracle和Sql Server 2008中返回结果集执行存储过程
问题描述:
我在oracle和Sql Server 2008中有一个存储过程同名,并返回相同的列。 Oracle程序使用了ref cursor。我如何在相同的c#代码中使用这些过程。两个程序但使用相同的flatform c#。
i have a stored procedure in oracle and Sql Server 2008 same name and return same column. Oracle procedure used ref cursor. How can i use those procedure in same c# code. Two procedure but use same flatform c#.
FBDataAccess fbDataAccess = new FBDataAccess();
DbCommand dbCommand = null;
dbCommand = fbDataAccess.SQLProcedure("wsp_user_RootMenu");
fbDataAccess.FBWDatabase.AddInParameter(dbCommand, "userlevel", DbType.Int16, UserLevel);
fbDataAccess.FBWDatabase.AddInParameter(dbCommand, "islamicYN", DbType.String, islamicYN.Trim());
fbDataAccess.FBWDatabase.AddInParameter(dbCommand, "user_code", DbType.Int16, UserID);
fbDataAccess.FBWDatabase.AddInParameter(dbCommand, "cv_1", DbType.Cursor);
dbCommand.Parameters["cv_1"].Direction = ParameterDirection.Output;
reader = fbDataAccess.ExecuteSelect(dbCommand);
这里找不到DbType.cursor 。
请帮帮我。
谢谢。
Here DbType.cursor not found .
Pls help me.
Thanks.