C# code for user loging page boolean validate using SYSTEM.DATA.OLEDB

Posted by Cvbharathi89 under C# on 8/14/2012 | Points: 10 | Views : 1874 | Status : [Member] | Replies : 0
I am working in VS 2010 and Oracle 10g database environment, i am pl/sql developer , not much knowledge in .NET , i need your help here, i converting SQL server project into Oracle 10g database project ,i have used system.data.oledb for accessing oracle database.here is the C# code for SQL server accessing code ,the T-SQL returns 1 if user is registered else returns 0, here is the C# code,

public static bool Validate
(string userID, string password)
bool isValid = false;

DBAccess db = new DBAccess();
db.CommandType =

db.AddParameter("@LoginID", userID);
db.AddParameter("@Password", password);
isValid =


return isValid;

Can any one say how to rewrite this C# code for OLEDB. and my procedure has three variables,(two input variable and one out parameter.)
pl/sql query:
create or replace
procedure PRO_GET_SYSTEM_IsValidUser (v_LoginID in varchar2 , v_Password in varchar2, p_retVal out number)
select count (*) into p_retVal
from employees
where emailid = v_LoginID and password = v_Password and enabled = 'TRUE';

Thanks in Advance...



(No response found.)

Login to post response