بتاريخ: 23 أغسطس 201312 سنة comment_239438 السلام عليكم ورحمه الله وبركاته هذا اول برنامج اقوم بتصميمه ولدي مشكله تعبت وانا احاول في حلها وفشلت , انا صممت واجهه تطلب اسم المستخدم وكلمه المرور ولكناريد ان احدد عدد من المستخدمين يدخلون على شاشه معينه والمتسخدمين الاخرين على شاشه اخرى ومستخدمين اخرون على شاشه اخرى ولا اريد ان اعمل شاشه صلاحيات ولقد جربت الكود التالي ولكن تظهر لي رساله خطا وهذه الرسالهfrm-40735:when-button-pressed trigger raised unhandled exception ora-01422 وهذا الكودbeginselect count(*)into :a from red_userswhere red_user = :red_userand red_pass = :red_pass;end;if :a<1 then set_alert_property('ER',alert_message_text, 'the username or password is not correct'); end if;if :a>=1 then begin select red_idinto :red_id from red_userswhere ('9575')= :red_userand ('123456') = :red_pass;end; declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('admin',no_hide,do_replace,no_query_only,pl_id); end if; end elsif :a>=1 then begin select red_idinto :red_id from red_userswhere red_user = :red_userand red_pass = :red_pass;end; declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('RED_NEW_OREDER',no_hide,do_replace,no_query_only,pl_id); end if; end; end if; تقديم بلاغ
بتاريخ: 24 أغسطس 201312 سنة comment_239458 تأكد من جمل الاستعلام .. هناك احداها يرجع بأكثر من صف و انت ترجعهم في متغير استخدم الكيرسور في هذه الحاله أفضل من التخصيص للمتغيرات for rec in (select ... from any table ) loop pla pla pla end loop تقديم بلاغ
بتاريخ: 24 أغسطس 201312 سنة كاتب الموضوع comment_239464 ممكن لو تكرمت تكتب لي الكود , وشكرا لك تقديم بلاغ
بتاريخ: 25 أغسطس 201312 سنة comment_239471 declare V_RED_ID number; begin for rec in (select red_id from red_users where red_id =354354 and red_pass=54534354) loop :V_RED_ID := rec.red_id end loop; end; ده المثال و بامكانك تطبيقه في كل الاستعلامات داخل الفورم او الداتابيز ... تقديم بلاغ
بتاريخ: 31 أغسطس 201312 سنة كاتب الموضوع comment_239660 شكراً لك اخوي وجعله الله بموازيين حسانتك ولكني استخدمت هذا الكود واصبح يعمل معي begin select count(*) into :a from red_users where red_user = :red_user and red_pass = :red_pass; end; if :a<1 then set_alert_property('ER',alert_message_text,'You"ve entered an invalid ID / PASSWORD combination - Please retry.'); if show_alert('ER')= alert_button1 then exit_form(NO_VALIDATE); end if; end if; if :a>=1 then begin select red_id into :red_id from red_users where red_user = :red_user and red_pass = :red_pass; end; end if; if :red_id =1 then declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('RED_NEW_OREDER',no_hide,do_replace,no_query_only,pl_id); end if ; end; end if; if :red_id =2 then declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('ADMIN',no_hide,do_replace,no_query_only,pl_id); end if; end; end if; if :red_id =4 then declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('CREATE',no_hide,do_replace,no_query_only,pl_id); end if; end; elsif :a>=1 then begin select red_id into :red_id from red_users where red_user = :red_user and red_pass = :red_pass; end; declare pl_id paramlist; pl_name varchar2(10) :='tempdata'; begin pl_id :=get_parameter_list(pl_name); if id_null(pl_id) then pl_id :=create_parameter_list (pl_name); add_parameter (pl_id,'p_red_id',text_parameter,:red_id); call_form ('RED_ORDER',no_hide,do_replace,no_query_only,pl_id); end if; end; end if; ولكني اريد ان اضيف كود لليوزر المحضور وشكراً تم تعديل 31 أغسطس 201312 سنة بواسطة master_msn تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.