الانتقال إلى المحتوى
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

بتاريخ:

عندي مشكلة في التريجر الاتي

التريجر وظيفته يقرا الداتا من الداتا بيز ويعرضها على الفورم

المشكله انه بعد مايقراها بكرر اخر واحد في الداتا بيز وبيعرضه

فهل من مساعده

Declare


cursor c is select seq_id,product_name,product_spec,unit,quantity,order_id from order_details where order_id=:order_details.con;


v_seq_id order_details.seq_id%type;
v_product_name order_details.product_name%type;
v_product_spec   order_details.product_spec%type;
v_unit   order_details.unit%type;
v_quantity	order_details.quantity%type;
v_order_id 	order_details.order_id%type;


BEGIN if :order_details.con is  null then
message('You must enter the Order  number');
message('You must enter the Order number');

else 
open c;
loop
	fetch c into v_seq_id,v_product_name,v_product_spec,v_unit,v_quantity,v_order_id;
	:order_details.seq_id:=v_seq_id;
	:order_details.product_name:=v_product_name;
	:order_details.product_spec:=v_product_spec;
	:order_details.unit:=v_unit;
	:order_details.quantity:=v_quantity;
	:order_details.order_id:=v_order_id;


	next_record;
	
	exit when c%notfound;
end loop;

 end if;			


close c;



exception
	when no_data_found then
	message('no data');
	go_item(':order_details.con');


END;

بتاريخ:

السلام عليكم
اخي العزيز...
هل تريد من هذا الكود ان يقوم لك بعملية جلب بيانات وعرضها بفورم اخر ( دعنا نقول عملية بحث ) ؟؟؟
ان كان الجواب بنعم استخدك الــ DEFAULT-WHERE ...
انتظر ردك...
بالتوفيق

بتاريخ:
  • كاتب الموضوع

اه عملية بحث تحت شرط معين

بتاريخ:

السلام عليكم
اخي عماد...
استخدم الــ default-where

GO_BLOCK('BLK1');
SET_BLOCK_PROPERTY('BLK1',DEFAULT_WHERE,'GUEST_ID=:BLK.G_ID');
EXECUTE_QUERY(NO_VALIDATE);



بالتوفيق

بتاريخ:
  • كاتب الموضوع

الكود يعمل في حالة اني بدي اعرض داتا من جدول لنفس الداتا بلوك

لكن في حالة اني بدي اعرض الداتا من جدول ORDER_DETAILS

واعرضها في OFFER_DETAILS BLOCK

ماظبط معي

لكن الكود الي انا كاتبه بنفع لكن المشكله انه بكرر اخر ريكورد في الجدول على البلوك فبسبب مشكلة فهل من مساعده

بتاريخ:

السلام عليكم
اخي عماد...ممكن توضيح لكلامك ؟؟؟
وياريت ارفاق صور للمطلوب بالتحديد ؟؟

تم تعديل بواسطة PALI.ORACLE

بتاريخ:

السلام عليكم

اجعل امر الخروج Exit من الloop بعد امر ال fetch

fetch c into v_seq_id,v_product_name,v_product_spec,v_unit,v_quantity,v_order_id; exit when c%notfound;




جرب واخبرنا بالنتيجة

بتاريخ:

الاخ الكريم
حل المشكلة انك تكتب DELETE_RECORD بعد END LOOP
وجرب وقولنا .

بتاريخ:

السلام عليكم
إضافة بسيطة جدا
أخي الكريم المتغيرات التي انت وضعها هي السبب في هذا التكرار
يعني في جملة ال fetch باصي الناتج مباشرة الى التيكت الاي عندك مباشرة واضف قبل ال open لل لووب جملة go_block(''); واكتب اسم البلوك الذي به ناتج بيانات الكيرسور


يعني الكود هيكون كده

Declare
cursor c is select seq_id,product_name,product_spec,unit,quantity,order_id from order_details where order_id=:order_details.con;
BEGIN if :order_details.con is null then
message('You must enter the Order number');
message('You must enter the Order number');
else 
go_block('order_details');
open c;
loop
fetch c into :order_details.seq_id,:order_details.product_name,:order_details.product_spec,
rder_details.unit,:order_details.quantity,:order_details.order_id; exit when c%notfound;
next_record;

end loop;

end if; 


close c;
exception
when no_data_found then
message('no data');
go_item(':order_details.con');
END;



موفق

بتاريخ:
  • كاتب الموضوع

تم حل المشكله باني ضفت متغير number

وفي loop n+1

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

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

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

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

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

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.