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

Adf Inputtext Variable Preparestatement

Featured Replies

بتاريخ:

الاخوه الكرام السلام عليكم ورحمه الله

برجاء المساعدة يوجد عندي page in adf  عاوز ادخل الid  والاسم  ولكن عن طريق sql  يوجد عندي مشكلة فى زرا الحفظ

 

 

in page 2 inputtText  (it1 , it2)   1 jbutton (cb1_action) 

SQL Statement   =  INSERT INTO B1 (ID, NAME) VALUES (? , ? )

 

in page code

 

    static Connection    con = null ;

    static PreparedStatement   stat = null ;

 

    static String    user       ="hr" ;

    static String    password   ="hr" ;

    static String    SQLInser        ="INSERT INTO B1 (ID, NAME) VALUES (? , ? )";

    static String    url     = "jdbc:oracle:thin:@localhost:1521:orcl";

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

    private static  void insertCustomer(int pid , String pname){

 

    try {

        DriverManager.registerDriver(new OracleDriver());

        con = DriverManager.getConnection(url , user , password );

        stat = con.prepareStatement(SQLInser);

       

       

       

        stat.setInt(1,pid);

        stat.setString(2, pname);

       

        stat.executeUpdate();

       

       

       

    } catch (SQLException e) {

        System.err.println(e.getErrorCode());

        System.err.println(e.getMessage());

       

    }

--------------------------------------------------------------------------------------------------------- jbutton   what i can do because  vid and vname set variable  from  it1 and it2

   public String cb1_action() {

        // Add event code here...

       

        vid = it1.;

       

        vname =  it2;

       

       

       insertCustomer(vid , vname);

 

 

       

       

        return null;

    }

بتاريخ:

ما المشكلة بالضبط؟

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

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

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

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

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

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.