Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-23-2008, 11:28 PM
Member
 
Join Date: Apr 2008
Posts: 3
katko0ota is on a distinguished road
whats the code that we need to connect oracle10g with the netbeans
hi every one

i need to connect oracle 10 with jave (netbeans 6)

how can i??

and whats the code i have to use connect them??

please replay quickly

i neeeeeeeeeeed it help me
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-24-2008, 12:47 AM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 191
danielstoner is on a distinguished road
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: Java Database Connectivity
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-24-2008, 02:10 AM
Member
 
Join Date: Apr 2008
Posts: 3
katko0ota is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-24-2008, 02:13 AM
Member
 
Join Date: Apr 2008
Posts: 3
katko0ota is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-26-2008, 08:23 PM
Member
 
Join Date: Nov 2007
Posts: 6
roo7 is on a distinguished road
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("jdbcracle:thin:@loc alhost:1521:xe","system","manager");
}
catch(ClassNotFoundException cnfe){
cnfe.printStackTrace();
}
catch(SQLException sqle){
sqle.printStackTrace();
}
return connect;
}

}
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-26-2008, 08:01 AM
Eku Eku is offline
Senior Member
 
Join Date: May 2008
Location: Makati, Philippines
Posts: 228
Eku is on a distinguished road
Same as roo7, i just detailed some parts ^_^

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(); }
Just make sure you have properly configured your oracle, database and also installed the oracle driver.,
__________________
Mind only knows what lies near the heart, it alone sees the depth of the soul.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-15-2008, 07:52 PM
Member
 
Join Date: Mar 2008
Posts: 28
linuxswan is on a distinguished road
You can find the Database connectivity in the menus where you can provide all the information like ODBC connectivity.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot understand whats wrong Lehane_9 New To Java 1 03-06-2008 09:57 PM
Code to connect to a web site suji Networking 1 02-15-2008 06:05 PM
Netbeans 6.0 - code completion of method parameters mwildam NetBeans 9 12-18-2007 11:02 AM
Whats wrong with my code??? Soda New To Java 2 12-06-2007 02:54 PM
whats the difference between Java core,J2EE...... prince24 New To Java 2 07-11-2007 08:54 PM


All times are GMT +3. The time now is 02:06 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org