aspose file tools*
The moose likes JDBC and the fly likes how to know the url is whether correct or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to know the url is whether correct or not" Watch "how to know the url is whether correct or not" New topic
Author

how to know the url is whether correct or not

bhagya raavi
Greenhorn

Joined: Aug 26, 2008
Posts: 9
i am using
Connection con = DriverManager.getConnection("jdbcracle:thin:@localhost:1521:xe", "scott", "tiger");
in this jdbc--->connection
oracle--->database name
thin--->user
localhost:1521:xe--->url
in this how to know the user and url is correct
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
Originally posted by bhagya raavi:
i am using
Connection con = DriverManager.getConnection("jdbcracle:thin:@localhost:1521:xe", "scott", "tiger");
in this jdbc--->connection
oracle--->database name
thin--->user
localhost:1521:xe--->url
in this how to know the user and url is correct


thin--->driver
scott-->user
tiger-->password


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

From what I know :-

"jdbcracle:thin:@localhost:1521:xe", "scott", "tiger"


'jdbcracle:thin' specifies the Oracle JDBC thin driver.
'localhost:1521:xe' specifies the host and port number and the database name.
'scott' specifies the user.
'tiger' specifies the password.

And all are welcome to correct in case I made any mistake.

The connection wont be made if the URL Mentioned is not correct. I am not sure whether the type of error in that case can be ascertained from what is returned though.

Cheers,
Raj.
[ August 26, 2008: Message edited by: Raj Kamal ]
 
jQuery in Action, 2nd edition
 
subject: how to know the url is whether correct or not