Results 1 to 7 of 7
- 04-23-2008, 09:28 PM #1
Member
- Join Date
- Apr 2008
- Posts
- 3
- Rep Power
- 0
- 04-23-2008, 10:47 PM #2
I am not sure what you mean by connecting Oracle with Netbeans but if I get it right you might just want to search for a JDBC tutorial. There is one right on this site: http://www.java-forums.org/java-tuto...nectivity.html
Daniel @ [www.littletutorials.com]
Language is froth on the surface of thought
- 04-24-2008, 12:10 AM #3
Member
- Join Date
- Apr 2008
- Posts
- 3
- Rep Power
- 0
thanx danielstoner
i mean how can i connect the oracle10g with netbeans6 that i need it in my
project that its a website like e-voting that can we vote by internet >>the data base and interface i use oracle10g<<<
and by sms >>> so that i use netbeans
so i dont know how to connect them
i hope thats clear to help me
- 04-24-2008, 12:13 AM #4
Member
- Join Date
- Apr 2008
- Posts
- 3
- Rep Power
- 0
i need the code that help me to connect the oracle10g with netbeans??
and can you show me how to connect step by step
thanx for reading my post
- 05-26-2008, 06:23 PM #5
Member
- Join Date
- Nov 2007
- Posts
- 6
- Rep Power
- 0
package yourPackage;
import java.sql.*;
public class connection {
/** Creates a new instance of connection */
public connection() {
}
public static Connection getConnection(){
Connection connect =null;
try{
//load the driver
Class.forName("oracle.jdbc.driver.OracleDriver");
connect = DriverManager.getConnection("jdbc:oracle:thin:@loc alhost:1521:xe","system","manager");
}
catch(ClassNotFoundException cnfe){
cnfe.printStackTrace();
}
catch(SQLException sqle){
sqle.printStackTrace();
}
return connect;
}
}
- 06-26-2008, 06:01 AM #6
Senior Member
- Join Date
- May 2008
- Location
- Makati, Philippines
- Posts
- 234
- Rep Power
- 6
Same as roo7, i just detailed some parts ^_^
Just make sure you have properly configured your oracle, database and also installed the oracle driver.,Java Code:ResultSet Rs = null; try {Class.forName("oracle.jdbc.OracleDriver"); connection conn = "Oracle:thin:@<IP>:<port>:<SID>","<username>","<password>"; Statement Stmt = conn.prepareStatement(query); RS = Stmt.executeQuery(); } catch (Exception ex) { ex.printStackTrace(); }Mind only knows what lies near the heart, it alone sees the depth of the soul.
- 07-15-2008, 05:52 PM #7
Member
- Join Date
- Mar 2008
- Posts
- 28
- Rep Power
- 0
Similar Threads
-
Cannot understand whats wrong
By Lehane_9 in forum New To JavaReplies: 1Last Post: 03-06-2008, 07:57 PM -
Code to connect to a web site
By suji in forum NetworkingReplies: 1Last Post: 02-15-2008, 04:05 PM -
Netbeans 6.0 - code completion of method parameters
By mwildam in forum NetBeansReplies: 9Last Post: 12-18-2007, 09:02 AM -
Whats wrong with my code???
By Soda in forum New To JavaReplies: 2Last Post: 12-06-2007, 12:54 PM -
whats the difference between Java core,J2EE......
By prince24 in forum New To JavaReplies: 2Last Post: 07-11-2007, 06:54 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks