بتاريخ: 24 يوليو 200916 سنة comment_164324 عندي مشكلة في التريجر الاتيالتريجر وظيفته يقرا الداتا من الداتا بيز ويعرضها على الفورم المشكله انه بعد مايقراها بكرر اخر واحد في الداتا بيز وبيعرضه فهل من مساعده 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; تقديم بلاغ
بتاريخ: 24 يوليو 200916 سنة comment_164326 السلام عليكماخي العزيز...هل تريد من هذا الكود ان يقوم لك بعملية جلب بيانات وعرضها بفورم اخر ( دعنا نقول عملية بحث ) ؟؟؟ان كان الجواب بنعم استخدك الــ DEFAULT-WHERE ...انتظر ردك...بالتوفيق تقديم بلاغ
بتاريخ: 24 يوليو 200916 سنة comment_164351 السلام عليكماخي عماد...استخدم الــ default-where GO_BLOCK('BLK1'); SET_BLOCK_PROPERTY('BLK1',DEFAULT_WHERE,'GUEST_ID=:BLK.G_ID'); EXECUTE_QUERY(NO_VALIDATE); بالتوفيق تقديم بلاغ
بتاريخ: 24 يوليو 200916 سنة كاتب الموضوع comment_164378 الكود يعمل في حالة اني بدي اعرض داتا من جدول لنفس الداتا بلوك لكن في حالة اني بدي اعرض الداتا من جدول ORDER_DETAILS واعرضها في OFFER_DETAILS BLOCK ماظبط معي لكن الكود الي انا كاتبه بنفع لكن المشكله انه بكرر اخر ريكورد في الجدول على البلوك فبسبب مشكلة فهل من مساعده تقديم بلاغ
بتاريخ: 25 يوليو 200916 سنة comment_164388 السلام عليكماخي عماد...ممكن توضيح لكلامك ؟؟؟وياريت ارفاق صور للمطلوب بالتحديد ؟؟ تم تعديل 25 يوليو 200916 سنة بواسطة PALI.ORACLE تقديم بلاغ
بتاريخ: 25 يوليو 200916 سنة comment_164443 السلام عليكم اجعل امر الخروج 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; جرب واخبرنا بالنتيجة تقديم بلاغ
بتاريخ: 25 يوليو 200916 سنة comment_164444 الاخ الكريم حل المشكلة انك تكتب DELETE_RECORD بعد END LOOP وجرب وقولنا . تقديم بلاغ
بتاريخ: 25 يوليو 200916 سنة comment_164456 السلام عليكم إضافة بسيطة جدا أخي الكريم المتغيرات التي انت وضعها هي السبب في هذا التكرار يعني في جملة ال 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; موفق تقديم بلاغ
بتاريخ: 25 يوليو 200916 سنة كاتب الموضوع comment_164520 تم حل المشكله باني ضفت متغير numberوفي loop n+1 تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.