| 
		
			|  cudnt able to insert data from text box  in forms [message #332251] | Tue, 08 July 2008 00:58  |  
			|  |  
	| hey all, 
 i was trying to insert the datas into table online_reg but cudnt .can u advice me where is the exact problem located ?? .
 everything done well except inserting,. .
 
 
 declare
   		v_pass_word varchar2(10);
  		v_conf_paswd varchar2(10);
  		a number;
	
begin
		v_pass_word := :online_reg.pass_word;
		v_conf_paswd:= :online_reg.confirm_password;
 	
        		if 			
         	  		:online_reg.student_name  is null 
					 			 then
				   			message('enter the student name');
		    		elsif
          
          		:online_reg.user_name  is null 
		     			then
		     			message('enter the User name');
          	
        	elsif 
        				:online_reg.pass_word	is null 
					 		 	then
				   			message('enter the password');
        		
        		elsif 	
        			 :online_reg.confirm_password	is null 
					  		then
				   			message('confirm password');
        	 	elsif 
        	 		:online_reg.dob  is null 
		    			then
		    			message('enter the DOB');
						elsif
			   	 		 :online_reg.email_id is null 
		    				then
		    				message('enter the Email Id');
	 					elsif
			    	
			    		 :online_reg.phone is null 
			   	  	then
		    			message('enter the Phone No');
	 					end if;
	 					if  v_pass_word != v_conf_paswd then
        				a := show_alert('ALERT_INVALID');
        				go_item('confirm_password');
        		END if;	
        insert into online_reg(student_name,user_name,pass_word,dob,email_id,phone)
        values(:online_reg.student_name,:online_reg.user_name,:online_reg.pass_word,:online_reg.dob,:online_reg.email_id,:online_reg.phone);
        
exception
when others then
a := show_alert('ALERT_ERROR');
end;
 
 
 
 thanks in advance.
 |  
	|  |  | 
	| 
		
			| Re: cudnt able to insert data from text box  in forms [message #332254 is a reply to message #332251] | Tue, 08 July 2008 01:01   |  
			|  |  
	| formatted code 
 
/* Formatted on 2008/07/08 11:31 (Formatter Plus v4.8.8) */
DECLARE
   v_pass_word    VARCHAR2 (10);
   v_conf_paswd   VARCHAR2 (10);
   a              NUMBER;
BEGIN
   v_pass_word := :online_reg.pass_word;
   v_conf_paswd := :online_reg.confirm_password;
   IF :online_reg.student_name IS NULL
   THEN
      MESSAGE ('enter the student name');
   ELSIF :online_reg.user_name IS NULL
   THEN
      MESSAGE ('enter the User name');
   ELSIF :online_reg.pass_word IS NULL
   THEN
      MESSAGE ('enter the password');
   ELSIF :online_reg.confirm_password IS NULL
   THEN
      MESSAGE ('confirm password');
   ELSIF :online_reg.dob IS NULL
   THEN
      MESSAGE ('enter the DOB');
   ELSIF :online_reg.email_id IS NULL
   THEN
      MESSAGE ('enter the Email Id');
   ELSIF :online_reg.phone IS NULL
   THEN
      MESSAGE ('enter the Phone No');
   END IF;
   IF v_pass_word != v_conf_paswd
   THEN
      a := SHOW_ALERT ('ALERT_INVALID');
      GO_ITEM ('confirm_password');
   END IF;
   INSERT INTO online_reg
               (student_name, user_name,
                pass_word, dob, email_id,
                phone
               )
        VALUES (:online_reg.student_name, :online_reg.user_name,
                :online_reg.pass_word, :online_reg.dob, :online_reg.email_id,
                :online_reg.phone
               );
EXCEPTION
   WHEN OTHERS
   THEN
      a := SHOW_ALERT ('ALERT_ERROR');
END;
 
 |  
	|  |  | 
	| 
		
			| Re: cudnt able to insert data from text box  in forms [message #332258 is a reply to message #332251] | Tue, 08 July 2008 01:04   |  
			|  |  
	| online_reg table script 
 
CREATE TABLE online_reg(student_name VARCHAR2(10),user_name VARCHAR2(10)
 NOT NULL CONSTRAINT check_user_name CHECK (LENGTH(user_name) BETWEEN 5 AND 12),
pass_word VARCHAR2(10) NOT NULL,dob DATE ,email_id VARCHAR2(20),phone VARCHAR2(10),
CONSTRAINT uni_cols UNIQUE (user_name,email_id)) |  
	|  |  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  |