facebook

i want to run Jdbc connection from elipse

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #291536 Reply

    i have written follwoing code and added jar files ojdbc14.jar but I could not establish the connection.so plz give sol to run this code

    giving output:

    (in console)
    java.sql.SQLException: No suitable driver

    package one.sr;

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;

    public class InsertQueryEx {

    public static void main(String[] args)throws Exception
    {
    try{
    Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);

    Connection con = DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:orcl”,”system”,”oralce10g”);

    System.out.println(“CONNECTED”);
    Statement stmt=con.createStatement();
    System.out.println(“CONNECTED”);
    }catch(SQLException e)
    {

    System.out.println(e);
    }

    //System.out.println(“CONNECTED”);
    }

    }

    #291549 Reply

    Loyal Water
    Member

    Moving to Off Topic >> Software Development.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: i want to run Jdbc connection from elipse

You must be logged in to post in the forum log in