• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC with Oracle9i

 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to connect to Oracle9i. oracle-jdbc.jar file also available.where to place it?please give me a code snippet as soon as possible.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The oracle documentation covers this. What problems are you having?
 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how to connect thru Oracle driver thru JDBC to Oracle 9i.Please tell me where to place the Oracle driver (probably in the lib directory).Also do provide me with a little code snippet which works while connecting Oracle 9i.Do reply soon
 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also do give me a code snippet probably a working live example of using Oracle thin driver(Type 4).Do reply soon
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you working on a desktop applications or web-based? Generally we don't work on Oracle's API directly as this defeats the purpose of using JDBC. What exactly do you need to know? How to register the Oracle driver & gets a connection?
[ March 28, 2007: Message edited by: Chengwei Lee ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sonal Sharma:
I don't know how to connect thru Oracle driver thru JDBC to Oracle 9i.Please tell me where to place the Oracle driver (probably in the lib directory).Also do provide me with a little code snippet which works while connecting Oracle 9i.Do reply soon


Your driver needs to be in the classpath of your application. If the lib directory is included in the classpath depends on what sort of application you have and how you run it. Like I say this is pretty thoroughly covered by Oracle's documentation; all I can do is repeat what is written there. Have a read of the "JDBC Developer's Guide and Reference" book. If you are still having problems and need help trouble-shooting these feel free to post more questions
 
Sonal Sharma
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cheng,
I am working on a web-based application.Please do provide me a little code snippet to connect to Oracle 9i.
One more query while building multiuser web-based application using SQL Server 2000, microsoft JDBC driver do we need to create System DSN or User DSN?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonal,

Since you're working with a web-based application, you'll need to read your application/web server documentation how to configure the Oracle JDBC driver. As Paul pointed out, most likely the library needs to be on the classpath.

As for code samples, there's quite a lot to download from Oracle website. Do check it out & try to run it. If you meet with any issues, post here and we'll see what we could do.

Cheers!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

One more query while building multiuser web-based application using SQL Server 2000, microsoft JDBC driver do we need to create System DSN or User DSN?

No.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic