Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Finally Finished my Oracle install but now what?

Re: Finally Finished my Oracle install but now what?

From: Carlos Saltos <csaltos_at_netscape.net>
Date: Fri, 22 Nov 2002 04:42:44 -0500
Message-ID: <3DDDFC14.4090709@netscape.net>


You can use java on linux ... any java IDE could help you. Try Netbeans (http://www.netbeans.org) or Eclipse (http://www.eclipse.org).

For an initial java conection try these:

./samples/oci8/jdbc20-samples/CCache2.java /*

// You need to import the java.sql package to use JDBC import java.sql.*;

class Employee
{

   public static void main (String args [])

        throws SQLException
   {

     // Load the Oracle JDBC driver
     DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

     // Connect to the database
     // You can put a database name after the @ sign in the connection URL.
     Connection conn =
       DriverManager.getConnection ("jdbc:oracle:oci8:@", "scott", "tiger");

     // Create a Statement
     Statement stmt = conn.createStatement ();

     // Select the ENAME column from the EMP table
     ResultSet rset = stmt.executeQuery ("select ENAME from EMP");

     // Iterate through the result and print the employee names
     while (rset.next ())
       System.out.println (rset.getString (1));

     // Close the RseultSet
     rset.close();

     // Close the Statement
     stmt.close();

     // Close the connection
     conn.close();

   }
}

For more code samples for java development with Oracle go to:

http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html

Also you will need a JDBC background where you can find some documentation about it here:

http://java.sun.com/docs/books/tutorial/jdbc/index.html

Carlos Saltos

Crackpot wrote:
> Hello all,
> I finished installing Oracle 8i on my Suse 8.0 Server and I want to learn
> how to program to this database. Previously I used VB to connect to Access
> databases. That was easy but what other applications do I used to write to
> a Oracle Server or SQL Server? What does linux have equivelant to microsoft
> VB? Basically I want to know; if I want to start programing, what
> applications should I used to access the database test it and play with
> making tables etc....
> Thanks
Received on Fri Nov 22 2002 - 03:42:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US