بتاريخ: 3 سبتمبر 201213 سنة comment_227127 protected void doDML(int operation, TransactionEvent e) { if (operation ==DML_INSERT) { try { String sql="select max(ide) from etudiant" ; PreparedStatement stat = getDBTransaction().createPreparedStatement(sql, 1) ; ResultSet rs = (ResultSet)stat.executeQuery(); if (rs.next()) { int max = rs.getInt(1)+1; setIde(new Number(max)); } else { int max =1; setIde(new Number(max)); } } catch (Exception e1) { // TODO: Add catch code e1.printStackTrace(); } } super.doDML(operation, e); }} Error(334,23): java.lang.Number is abstract; cannot be instantiated Error(338,16): setIde(java.lang.Integer) in model.EtudiantImpl cannot be applied to (int[]) تقديم بلاغ
بتاريخ: 4 سبتمبر 201213 سنة comment_227138 أخي الفاضل :يجب أن تتأكد من نوع البيانات المطلوب المشكلة هنا أن نوع java.lang.Number غير متوافق من نوع بيانات الحقل المراد وضع القيمة به عدل سطر الكود setIde(new Number(max)); إلى setIde(new oracle.jbo.domain.Number(max)); مع تمنياتي بالتوفيق تقديم بلاغ
بتاريخ: 4 سبتمبر 201213 سنة كاتب الموضوع comment_227158 شكرا اخي للاهتمام .....مع العلم اني اشتغل ب mysql تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.