Click here to Skip to main content
16,005,241 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: why binary? Pin
dairiseky6-Apr-04 2:32
dairiseky6-Apr-04 2:32 
GeneralRe: why binary? Pin
David Crow6-Apr-04 3:27
David Crow6-Apr-04 3:27 
GeneralRe: avenger_sb25//read, write data files Pin
avenger_sb256-Apr-04 11:12
avenger_sb256-Apr-04 11:12 
GeneralRe: avenger_sb25//read, write data files Pin
dairiseky6-Apr-04 23:48
dairiseky6-Apr-04 23:48 
GeneralRe: avenger_sb25//read, write data files Pin
Anonymous7-Apr-04 3:27
Anonymous7-Apr-04 3:27 
GeneralRe: avenger_sb25//read, write data files Pin
avenger_sb257-Apr-04 3:35
avenger_sb257-Apr-04 3:35 
GeneralRe: avenger_sb25//read, write data files Pin
dairiseky7-Apr-04 5:32
dairiseky7-Apr-04 5:32 
GeneralOracle Stored Procedure Problem in .NET Pin
Anonymous5-Apr-04 23:20
Anonymous5-Apr-04 23:20 
My problem is this, i have a stored procedure in oracle,
and i which authenticates a user on the basis of loginName
and password.

the problem is that when i accesssed it through C#
giving the two parameter as input and one parameter as output.
there is no value return in output parameter.
can some on tell me how to get the output parameter value in my code
Thanks In Advance

//------------- stored procedure name is
===========SecurityPkg.Authenticate=============

PROCEDURE Authenticate(loginName IN VARCHAR2,loginPassword IN VARCHAR2, loginResult OUT INT )
IS
objectId NUMBER := -1;
objectPwd VARCHAR2(100);
passwordExpiredDate DATE;
BEGIN
Select OBJECT_ID,PASSWORD,PASSWORD_EXPIRES INTO objectId,objectPwd,passwordExpiredDate
From Application_User
Where Application_User.Login_Name=loginName;

IF(objectId = -1) THEN
loginResult := ACCOUNT_DOESNOT_EXITS;
END IF;

IF(objectPwd != loginPassword) THEN
loginResult := WRONG_PASSWORD;
End if;

IF(passwordExpiredDate < SYSDATE) THEN
loginResult := PASSWORD_EXPIRED;
END IF;

EXCEPTION
WHEN NO_DATA_FOUND THEN
loginResult := ACCOUNT_DOESNOT_EXITS;

END Authenticate;


//------------------- csharp code that access the above stored procedure of oracle

OracleCommand cmd=new OracleCommand();
cmd.CommandText="Security_Pkg.Authenticate";
cmd.Connection=myConnection;
cmd.CommandType=CommandType.StoredProcedure;

// first param
OracleParameter loginNameParam=new OracleParameter("loginName",OracleDbType.Varchar2);
loginNameParam.Direction=ParameterDirection.Input;
loginNameParam.Value="Ali";

// 2nd param
OracleParameter loginPasswordParam=new OracleParameter("loginPassword",OracleDbType.Varchar2);
loginPasswordParam.Direction=ParameterDirection.Input;
loginPasswordParam.Value="pass";

// 3rd param
OracleParameter loginResultParam=new OracleParameter("loginResult",OracleDbType.Int16);
loginResultParam.Direction=ParameterDirection.Output;
cmd.Parameters.Add(loginNameParam);
cmd.Parameters.Add(loginPasswordParam);
cmd.Parameters.Add(loginResultParam);

cmd.ExecuteNonQuery();

Now when i check the value of loginResultParam, its null.
can any one tell me how to get its value
QuestionGDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
Indrawati5-Apr-04 22:39
Indrawati5-Apr-04 22:39 
AnswerRe: GDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
Mike Dimmick5-Apr-04 23:43
Mike Dimmick5-Apr-04 23:43 
AnswerRe: GDI+ question: Bitmap:FromFile, how to detect non-existent image file? Pin
JonCage6-Apr-04 1:37
JonCage6-Apr-04 1:37 
GeneralWindows idle time Pin
Florin Ochiana5-Apr-04 22:28
Florin Ochiana5-Apr-04 22:28 
GeneralRe: Windows idle time Pin
Rage5-Apr-04 22:35
professionalRage5-Apr-04 22:35 
GeneralRe: Windows idle time Pin
Florin Ochiana5-Apr-04 22:43
Florin Ochiana5-Apr-04 22:43 
GeneralRe: Windows idle time Pin
Rage5-Apr-04 22:48
professionalRage5-Apr-04 22:48 
GeneralRe: Windows idle time Pin
Florin Ochiana5-Apr-04 22:52
Florin Ochiana5-Apr-04 22:52 
GeneralRe: Windows idle time Pin
avenger_sb255-Apr-04 23:25
avenger_sb255-Apr-04 23:25 
GeneralRe: Windows idle time Pin
Rage6-Apr-04 0:46
professionalRage6-Apr-04 0:46 
GeneralRe: Windows idle time Pin
Antony M Kancidrowski6-Apr-04 1:37
Antony M Kancidrowski6-Apr-04 1:37 
GeneralRe: Windows idle time Pin
David Crow6-Apr-04 2:15
David Crow6-Apr-04 2:15 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
Anonymous7-Apr-04 3:18
Anonymous7-Apr-04 3:18 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
avenger_sb257-Apr-04 3:40
avenger_sb257-Apr-04 3:40 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
David Crow7-Apr-04 4:24
David Crow7-Apr-04 4:24 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
David Crow7-Apr-04 4:17
David Crow7-Apr-04 4:17 
GeneralRe: Windows idle time - GetLastInputInfo error Pin
Bharat Gidde7-Apr-04 6:34
Bharat Gidde7-Apr-04 6:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.