This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I am completely new to Oracle with basic sql plus knowledge. I have installed Oracle 10g Release 2 and java 1.6 .
All i want to do is to connect Oracle with Java so that i can send queries and retrieve results. I found that we need a jdbc driver
and a odbc driver for connecting. How can i get them and how to install ? Or should i use another type of driver ?
Does Oracle have a server ?if yes , should I use it for accessing the database?
Daniel William wrote:
Does Oracle have a server ?if yes , should I use it for accessing the database? Can someone explain?
What kind of server do you expect? Do you mean a bundled application server with 10gR2 database setup? Please state it clearly. But in order to connect to database within your java code you don't need any server. Just have your database and tns listener running and follow any jdbc tutorial if necessary. This might be helpful for oracle specific how-to's : JDBC How-To Documents
Joined: Nov 19, 2009
ok.i understood that i dont need a server to connect oracle with java.
i have created an Oracle database .
i have a java program which uses jdbc -odbc driver set for connecting it with Oracle.
there are 4 types of jdbc drivers . only one type can be used for connecting with odbc driver.
which type should i use and how can i configure it to work with odbc.?
i am just using a stand alone Java application program.
Joined: Sep 01, 2005
Why don't you use jdbc thin driver? Why are you using odbc? Is it on purpose?
Joined: Nov 19, 2009
its because i have used it in our lab session. i didnt have this difficulty of installing ,as it was set and configured by our admin.
i also did all programs using this driver set.
so to switch to thin driver i need learn about its syntax in java.
now whats the use of thin driver ? is it the right one for simple java programs?
To turn your question on its head: what is the use of the JDBC-ODBC bridge? It is (by Sun's own admission) not what you would call a first choice for JDBC. If there is a vendor specific equivalent is is much easier to just use that.
The Orcale thin driver is a type 4 driver, so you need no extra configuration. I would always use it when working with Oracle.