الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Help In Java Code

بدأه ah_maksoud في 8 ديسمبر 2008 · 3 رد · 912 مشاهدة · في JavaEE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

hi members

i make a java application to connect to oracle database in netbeans 6.5 but it do not work and give me error plz help me to solvve this error

the code:

package javaapplication4;

import java.sql.*;

public class Main

{

public static void main(String[] args) throws SQLException

{

DriverManager.registerDriver (new oracle.jdbc.OracleDriver());

// Connect to the local database

Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@myhost:1521:ORCL","system", "ahmed");

// Query the employee names

Statement stmt = conn.createStatement ();

ResultSet rset = stmt.executeQuery ("SELECT name FROM doctor");

// Print the name out

while (rset.next ())

System.out.println (rset.getString (1));

//close the result set, statement, and the connection

rset.close();

stmt.close();

conn.close();

}

}

#2

ايه الخطأ يعني يا بوب

الكومبايلر بيقولك ايه

#3

the wrong thing at the statment new oracle

it tell that there is no package with this name

#4

خلاص يبقي لازم تحط ال jar اللي انت جبته من على موقع اوراكل في ال classpath بتاعك

مواضيع مشابهة