• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to know the url is whether correct or not

 
bhagya raavi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic