الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ما الخطأ فى هذا الكود وجزاكم الله خيرا

Featured Replies

بتاريخ:

log on لنفرض أن لدينا مشروع وقمت بعمل واجهة له وهى عبارة عن مدخل لهذا المشروع شاشة
user_name , user_no , password , ok , cancel وهى تتكون من ثلاثة تكست أيتم وزرين

cancel فكتبت الكود التالى تحت الزر
DO_KEY('exit_form(no_commit)');

ok وكتبت الكود التالى تحت الزر

IF(:user_no IS NULL)THEN
message('please insert your user number   ');
end if;
IF(:user_name IS NULL)THEN
message('please insert your user name   ');
end if;
IF(:password  IS NULL)THEN
message('please insert your password ');
end if;
declare
a varchar2(10);
b varchar2(10);
begin loop
select user_name,password into a,b from users
where user_no=:user_no;
end loop ;
if :user_no=:user_no then
if(a=:user_name and b=:password) then
message('Y have a bad password');
raise form_trigger_failure;
else
call_form('E:\fateh\main_window',hide,do_replace);
end if;
end if;
end;


فما الخطأ فى هذا الكود لكى عندما أدخل رقم المستخدم واسمه والباسورد وأضغط "أوكى" فاذا كانت هذا البيانات مخزنة فى قاعدة البيانات
main_window فانها تقوم هذه الشاشة بادخالى مباشرة الى شاشة

'E:\fateh\main_window' والتى نفترض وجودها كما فى هذا المسار
أرجو التوضيح وتصحيح الخطأ وجزاكم الله عنى كل خير
[email protected]

بتاريخ:

حـبـيـب قـلـبي ..
في الـبـداية .. خل الكود منظم
بحيث التعريفات تكون في الـDeclare
والعمليات بعد الـbegin .. وممكن تضيف Exception لو تريد
يعني أنقل الـ3 if statements لـ داخل الـBegin

ثانياً: شـو فـايـدة الـLoop ؟؟ والكود مالك ماله أي داعي بتاتاً

ثالثا: أنا أقترح عليك تعدل الكود إلى التالي ..
جــرب ورد علي .. لأني مب متأكــد 100%

declare
a varchar2(10);
b varchar2(10);
begin IF(:user_no IS NULL)THEN
message('please insert your user number ');
end if;
IF(:user_name IS NULL)THEN
message('please insert your user name ');
end if;
IF(:password IS NULL)THEN
message('please insert your password ');
end if;

select user_name,password into a,b from users
where user_no=:user_no;

if :user_no=:user_no then
if(a=:user_name and b=:password) then
call_form('E:\fateh\main_window',hide,do_replace);
else
message('Y have a bad password');
raise form_trigger_failure;
end if;
end if;
end;

بتاريخ:

تحتاج إلى ترقر عند ادخال رقم المستخدم
وترقر عندادخال كلمة المرور

-- use this trigger ( vald_item user_no) 
begin if :user_no is not null then
      select user_name,password into :user_name,:global.password from users
      where user_no=:user_no;
      exception
      when others then
               raise form_trigger_failure;
    else
     message('please insert your user number ');
     :global.password:=null;
     raise form_trigger_failure;
 end if;
end;
-------------------------------------------------------------------
--    use this trigger ( vald_item password)   
begin if :password is not null and :global.password  is not null and :global.password =:password then
      call_form('E:\fateh\main_window',hide,do_replace);  -- dont use path 
  else
      message('Y have a bad password');
  end if;
end;

بتاريخ:

ملاحظة بعد مناداة الفورم أو قبله
أو عندما تكون شاشة الدخول نشيطة قم بالغاء كلمة المرور المحفوظة
:global.password:=null;
وبالنسبة للتريقر الخاص بكلمة المرور الصحيح
KEY NEXT_ITEM

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.