This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Type-2 Driver

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all !
Can any help me out for connecting type-2 driver with oracle,I have installed oracle8 personal edition in my computer its working well with odbc(Type one).I have set classpath for OrcaleDriver.
But while using type-2
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc racle:MyDb","scott","tiger");
it throws following exception:
java.sql.SQLException:Sub Protocol must be specified in connection URL
Thankx in advance.

Shailendra.
 
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by shailendra vasale:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc: oracle:MyDb","scott","tiger");
it throws following exception:
java.sql.SQLException:Sub Protocol must be specified in connection URL


Yeah, its obviously throws exception. I guess ur using OCI drivers.what is MyDb.
The format should be
protocol:sub-protocol:driver-type:user-name: pwd

jdbc: oracle:driver-type:user/password@database
For a detailed explanation, follow the link,
Goto Oracle .

HTH..
Anil

[This message has been edited by Anil Vupputuri (edited June 14, 2001).]
[This message has been edited by Anil Vupputuri (edited June 14, 2001).]
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you just replaced JDBC:ODBC with JDBC:ORACLE keeping DSN name as it is.What Anil suggests is right.There is no DSN name as such Instead we have driver type.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic