• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to know the url is whether correct or not

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using
Connection con = DriverManager.getConnection("jdbc:oracle: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
 
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by bhagya raavi:
i am using
Connection con = DriverManager.getConnection("jdbc:oracle: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
 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

From what I know :-


"jdbc:oracle:thin:@localhost:1521:xe", "scott", "tiger"



'jdbc:oracle: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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic