Note that there are some explanatory texts on larger screens.

plurals
  1. POwhy ORA-01403: No Data Found error is showing
    primarykey
    data
    text
    <p>I am developing a ASP.NET web app using Oracle 11g at backend. I have written a separate SP for fetching User Login Data and flags from database table. Please find below code snippet in FetchUserLoginData() Method:</p> <pre><code>String spName = "FETCH_USER_LOGIN_ROLE_DATA"; OracleCommand dbCheckLogin=new OracleCommand(); OracleDataReader LoginDataReader=null; dbCheckLogin = dbCon.GetDBCommand(spName,dbCheckLogin); dbCheckLogin.Parameters.Add(new OracleParameter("USERID", LoginID)); dbCheckLogin.Parameters.Add(new OracleParameter("USERPWD", Password)); dbCheckLogin.Parameters.Add(new OracleParameter("USERGUI_ID", OracleType.VarChar,2000)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("ADMIN_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("CLOSED_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("LOCKED_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("LOGGEDIN_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("USER_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; dbCheckLogin.Parameters.Add(new OracleParameter("SEASED_FLG", OracleType.VarChar,20)).Direction = ParameterDirection.Output; LoginDataReader = dbCheckLogin.ExecuteReader(); while (LoginDataReader.Read()) { user.USER_SL = Convert.ToString(LoginDataReader["USER_SL"]); user.ISADMIN=LoginDataReader["ISADMIN"].ToString(); user.ISCLOSED = LoginDataReader["ISCLOSED"].ToString(); user.ISLOCKED = LoginDataReader["ISLOCKED"].ToString(); user.ISLOGGEDIN = LoginDataReader["ISLOGGEDIN"].ToString(); user.ISPOWERUSER = LoginDataReader["ISPOWERUSER"].ToString(); user.ISSEASED= LoginDataReader["ISSEASED"].ToString(); } </code></pre> <p>Now problem is, when I tried to run without any SP, just writing and executing a direct query, there is no problem, it fetches data from database perfectly well. In case of SP, i got an exception: No DATA Found. I am giving a correct userName and password eachtime, still it can not fetch any data. Even I tried to run the procedure from SQLDeveloper or PL/SQL and found no problem. The problem only lies when I tried to execute SP from server side coding.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload