Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL execution problem (PL/SQL + HTP)

Re: SQL execution problem (PL/SQL + HTP)

From: Damian <damian_at_kronopol.com.pl>
Date: Thu, 20 May 2004 07:18:36 +0200
Message-ID: <40AC3FAC.90802@kronopol.com.pl>


Hi,

I solved that problem myself.
I ought to declare

us t_users.name%TYPE default i_username; ps t_users.pass%TYPE default i_password;

so SQL should be:

select count(*) into m_count from t_users where name = us and pass = ps;

everything is working OK !!!

Damian.

Damian wrote:

> Hi,
>
> I try to execute procedure like this:
>
> procedure verify_user (
> i_username IN VARCHAR2,
> i_password IN VARCHAR2
> )
> IS
> m_count number;
> BEGIN
> m_count := 0;
> i_username := 'admin';
> i_password := '123';
>
> select count(*) into m_count from t_users
> where name = i_username and pass = i_password;
>
> if m_count = 1
> THEN
> htp.print('OK !');
> ELSE
> htp.print('NO RECORDS');
> END IF;
> END verify_user;
>
>
>
> QUESTION:
>
> This procedure should set m_count to 1 and then print OK in web browser
> (there is 1 record fulfill a condition - I'M SURE OF THAT !!!). Why it
> isn't work properly ???
>
Received on Thu May 20 2004 - 00:18:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US