-
December 15th, 2005, 09:05 AM
#1
Trouble with Java + Oracle
I can't get my program to connect to the Oracle Server at my school where I have my database located. I was given a user name and password, used scott & tiger for the example, also given the url, but it still doesn't work. Am I doing something wrong here?
public class DataBean
{
private CachedRowSet rowSet;
// construct TitlesBean object
public void DataBean() throws Exception
{
//load the Oracle Driver
Class.forName( "oracle.jdbc.driver.OracleDriver" );
// specify properties of CachedRowSet
rowSet = new CachedRowSetImpl();
rowSet.setUrl( "jdbcracle:thin:@vali.******:1**1rcl" );
rowSet.setUsername( "Scott" );
rowSet.setPassword( "Tiger" );
rowSet.setCommand("SELECT * FROM courses");
rowSet.execute();
} // end DataBean constructor
-
December 18th, 2005, 07:20 AM
#2
You're saying you can't connect when you're NOT at school? Either it's an intranet or their
firewall is blocking, if that's the case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|