• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Connecting To Database

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

I am currently using Java 1.4 on Windows 98 and have installed Oracle 9i on my system. What do I need to do to be able to access the database. I understand that I would need to use the ODBC drivers. Do I use the one that was installed when I installed Oracle 9i on my system. How can I test if I can access the tables in the database.

I'm fairly new to Java and learning how to use JDBC now.

Thanks in advance
R
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Where is the Oracle RDBMS installed? Is it on your windows PC? Or is it on a server that you're trying to connect to from your PC? If both the Oracle server and the application you are using to connect to it are on your PC, did the Oracle installation process give you an opportunity to congfigure and test your Net setup?

There are many, many different scenarios possible but one universal thing you can try is to startup SQL*PLus from your start menu (or there may be an icon for it on the desktop). Then see if it starts up and gives you a SQL> prompt.

I'm afraid I need more details from you before I can give you a more specific answer. One thing, if you are connecting to the "localhost" (your own PC), you wouldn't need ODBC drivers to use SQL*Plus.

HTH,

Barbara
 
Barbara Norway
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just reread your post and if you mean how would you connect to the database within Java, you could use JDBC not ODBC, I think. There are other alternatives but I'll have to leave the details of that to the Java experts.

Barbara
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forget ODBC, that's Microsoft stuff. You need two things. One is an Oracle JDBC driver. There's probably one included with your 9i installation. If not you can get one from Oracle's website.

Secondly you need to know how to write JDBC code in Java. One good place to start learning is Sun's JDBC Tutorial.

Jules
 
reply
    Bookmark Topic Watch Topic
  • New Topic