Home » Developer & Programmer » Forms » Login Form (Windows XP)
icon9.gif  Login Form [message #304513] Wed, 05 March 2008 08:01 Go to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
Hi guyz,

im New here nice to see you all....i have a problem with my login form when im compling my form its show error
______________________________________________
Error 49 at line7
bad bing variable 'MENU_MASTER.USERNAME'
______________________________________________

please get me out of this form i dont no where im wrong on this below when_button_pressed trigger.

waiting for replies guyz.....

SQL> DESC MENU_MASTER;
Name Null? Type
----------------------------------------- -------- ------------
USERNAME NOT NULL VARCHAR2(15)
PASSWORD NOT NULL VARCHAR2(15)
STATUS NOT NULL CHAR(1)

SQL> SELECT * FROM MENU_MASTER;

USERNAME PASSWORD S
--------------- --------------- -
ADMIN ADMIN Y
USER USER N

----------------------------------------------------------------
DECLARE
A VARCHAR2(15);
B VARCHAR2(15);
C CHAR(1);

BEGIN
SELECT USERNAME,PASSWORD,STATUS INTO A,B,C FROM MENU_MASTER WHERE A =:MENU_MASTER.USERNAME;
IF A=:USERNAME AND B=:PASSWORD AND C='N' THEN
UPDATE MENU_MASTER SET STATUS ='Y' WHERE USERNAME=:A;
COMMIT_FORM;
CALL_FORM(GETPATH||'MAIN_MENU',HIDE);
CLEAR_RECORD;
RAISE FORM TRIGGER_FAILURE
ELSIF C='Y' THEN
MESSAGE('You have already logged on at another Machine !!!!');
ELSE
MESSAGE('Invalid Password or Username !!!');
GO_ITEM('USER_MASTER.USERNAME');
END IF;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
MESSAGE('Invalid Username or Password!!!');
END;
---------------------------------------------------------------


Regards

Munnabhai
Re: Login Form [message #304615 is a reply to message #304513] Wed, 05 March 2008 18:03 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Is this your first Form? Have you defined any blocks? Have you worked through any sample forms or tutorials? Have you looked at the 'logon' forms that exist in this forum already? Look at:
Login form
http://www.orafaq.com/forum/t/79508/0/unread/67467/#msg_228883

David
Re: Login Form [message #304693 is a reply to message #304615] Thu, 06 March 2008 03:40 Go to previous messageGo to next message
mksenthil
Messages: 15
Registered: February 2008
Location: chennai
Junior Member
DECLARE
			UN VARCHAR2(10);
			PWD CHAR(10);
		
		BEGIN
			SELECT USER_ID,PASSWORD INTO UN,PWD FROM LOGIN 
			WHERE UN = :USER_ID
			AND PWD = :PASSWORD;
			
			IF :LOGIN.USER_ID = UN AND :LOGIN.PASSWORD = PWD THEN
				CALL_FORM('D:\DevSuiteHome_1\forms\senthil\MAIN');
			ELSE
				message('INVALID USER');
			END IF;
			EXCEPTION
				WHEN NO_DATA_FOUND THEN 
				MESSAGE('INVALID USERNAME AND PASSWORD');
			END;
				
	

in my login page i typed the above code in login button WHEN-BUTTON-PRESSED trigger its shows the exception message only....unable to login please me out..

this is the table design and the values i inserted

SQL> desc login;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 USER_ID                                   NOT NULL VARCHAR2(10)
 PASSWORD                                  NOT NULL CHAR(10)
 STATUS                                             CHAR(1)

SQL> select * from login;

USER_ID    PASSWORD   S
---------- ---------- -
ADMIN      ADMIN      Y

Re: Login Form [message #304816 is a reply to message #304693] Thu, 06 March 2008 17:10 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Put "message(); pause;" pairs into your code. Display the values that are being passed in via ':user_id', etc.

David
Previous Topic: Migration 6i to 10g WIN_API_DIRECTORY_LIST
Next Topic: How to see which was the previous form
Goto Forum:
  


Current Time: Sun Dec 04 06:38:42 CST 2016

Total time taken to generate the page: 0.10795 seconds