• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC basic question

 
dhana rangu
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

here are the jdbc connection statements..


I donot understand what to specify in the URL.
I am using oracle as the database...
CAn anyone help me with the components of url to be specified in getConnection


THANKS A LOT FOR UR HELP
dhana
[ June 17, 2004: Message edited by: Bear Bibeault ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, you should use

rather than DriverManager.registerDriver(...)

This allows the Driver to register itself as it is loaded. Otherwise you may find that the Driver gets registered twice.

The DatabaseURL for Oracle type4 drivers is typically "jdbc:oracle:thin:@<dbserver>:1521:<dbname>"
eg "jdbc:oracle:thin:@oraclehost:1521:develop"

Dave

[ oops, caught by smilies again ]
[ June 17, 2004: Message edited by: David O'Meara ]
 
dhana rangu
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS A LOT FOR UR CLARIFICATION
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic