Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Why am I getting a Oracle numeric or value error

Avatar of bschave2
bschave2 asked on
Oracle Database.NET Programming
13 Comments1 Solution215 ViewsLast Modified:
I have a procedure that has 2 input paramaters to verify the username and password. I also have three 3 integer output parms to pass me back some info. Now I want to add a varchar2 value back as well giving me the first name of the user. The problem is I keep getting a numeric or value error and cannot figure out why. Can someone please shed some light on this for me? My code is attached.
PROCEDURE VerifyCounterparty(
    v_EmailAddress IN VARCHAR,
    v_Password     IN VARCHAR2,
    v_Count OUT NUMBER,
    v_AccountLocked OUT NUMBER,
    v_TradesCompanyId OUT NUMBER,
    v_FirstName OUT VARCHAR2)
IS
BEGIN
  SELECT COUNT(firstname) firstname,
    ACCOUNTLOCKED,
    TRADESCOMPANYID,
    FIRSTNAME
  INTO v_Count,
    v_AccountLocked,
    v_TradesCompanyId,
    v_FirstName
  FROM T_USER
  WHERE EMAILADDRESS = v_EmailAddress
  AND PASSWORD       = v_Password GROUP BY ACCOUNTLOCKED, TRADESCOMPANYID, FIRSTNAME;
EXCEPTION
WHEN NO_DATA_FOUND THEN
  v_Count           := 0;
  v_AccountLocked   := 0;
  v_TradesCompanyId := 0;
END VerifyCounterparty;