Need help connecting to a Oracle DB - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming » Need help connecting to a Oracle DB


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-04-2006   #1 (permalink)
lauren
Junior Member
 
Join Date: Jul 2006
Age: 26
Posts: 5
Default Need help connecting to a Oracle DB

Hi there, I Am very new to Oracle, and this forum , and a lil unsure how to do some stuffs.

My situation is, im working on NetBeans and have to connect to a Oracle DB in Oracle Database 10g Express Edition. So far i did:

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

final private String driverName = "oracle.jdbc.driver.OracleDriver";


I am not sure of this the connection string, is the syntax below correct?

conn = DriverManager.getConnection("jdbcracle:thin:@ + dbmsHost + ":" + dbmsPortNumber + ":" dbmsName + userId + passWord);

If so, is this how the connection string should look like? Example:
conn = DriverManager.getConnection("jdbcracle:thin:@loc alhost:8081:HashTable,user,pass");


Also in NetBeans, under Runtime, i've added Oracle driver. When trying to connect, they ask for this:
jdbcracle:thin:@<HOST>:<PORT>:<SID>

May i know what is the SID? Is it the table name?


Is there any other thing else i missed out? Do i need to set CLASSPATH in command prompt? Im unsure of what to set besides the "ojdbc14.jar" driver file.

Any help will be appreciated. Been trying to connect for quite some time but i keep getting error msg :S Thanks for reading this.

LAUREN
lauren is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Problems in upgrading from Oracle 8 to 9i zachary Programming 0 07-29-2006 04:21 PM
new to oracle aaron Programming 0 07-29-2006 03:42 PM
ODBC error while connecting to database andrew ASP 2 07-27-2006 10:35 AM
Perl DBD::Oracle andrew Perl 0 07-12-2006 05:52 PM
Perl & Oracle Database; vcvars32.bat sebastian Perl 0 07-02-2006 01:04 PM


footer left
All times are GMT. The time now is 12:45 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Mortgages | Impresoras | Naruto Shippuden | Hsbc | Mbna

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49