how to perform this query as a oracle strored procedure and call it from asp.net ,C# code and
dataset using parameters?
SELECT * FROM EMP where deptno like nvl(pDeptNo,'%') AND hiredate = pDate;
View Complete Post
When running your tests how do you know which parts of your product code are actually executed and tested? This article presents a complete system called Fundamental Function code coverage that operates at the method level. The author gives an overview of the system so you can understand code coverage principles, explains the key parts of the underlying code, and discusses how code coverage fits into the overall product development cycle. After reading this article you will be able to perform code coverage analysis on any .NET software system.
MSDN Magazine April 2004
Here is my SP:
create or replacePROCEDURE ZGETUSERSSIGNONS (vUid IN VARCHAR2, p_getuserssignon_recordset1 OUT SYS_REFCURSOR) ASBEGIN Open p_getuserssignon_recordset1 for SELECT Distinct(Userid), UserPassword, SecurityLevel, ActiveStatusFROM ZSIGNON WHERE substr(UserId,1,2) <> vUidOrder By UserId;END ZGETUSERSSIGNONS;
I would like to run this SP from code and fill a gridview with the result.
I am not sure how to go about this, as I have found several different examples, other than the one I think I need.
I am using the oracle data provider and I have an input parameter (vUid, which will equal "zz").
First question. When filling a gridview with a result set from a stored procedure should the recordset OUT be defined as a REFCURSOR (like i did above)?
Do you have example code as to how to execute the SP and fill a gridview? I keep trying different variations of code i've found on the internet without any success other than getting more confused.
(I am using VS 2005, VB).
Working on a c# project that has oracle as backend. I have problem creating a function in my codebehind page to create an array of paramenters for oracle stored procedure. for example i have the follwoing code for ms sql server...
SqlParameter parm =
DataCon.createSqlParameter ("@id", DataCon.DBNullIfBlank(txtid.Text.ToString()), SqlDbType.Char,9 ) ,
DataCon.createSqlParameter ("@FName", DataCon.DBNullIfBlank(txtFName.Text.ToString()), SqlDbType.VarChar,14),
DataCon.createSqlParameter ("@MI", DataCon.DBNullIfBlank(txtMI.Text.ToString()), SqlDbType.Char,1),
For the same in oracle I am using the followin
Not sure which category to put this question in, so I will put it in here.
Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL. (Business Logic Layer and Data Access Layer)
The BLL refers to the DAL and the main project refers to the BLL.
I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )
The code is:
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
Dim recordEntry As New UserRecord(connectionString)
recordEntry.UserName = "TestName"
recordEntry.BMI = bMI
recordEntry.BMR = bMR
recordEntry.FTM = fTM
recordEntry.TDEE = tDEE
recordEntry.TodayDate = dateForToday