Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java Databases
|
Java Databases Discussion specific to working with Java Databases. For other Java topics, please see related Java forums. For database discussions not specific to Java, please see the Database category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2004, 09:36 PM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing ORACLE data from Java, not using JDBC

I have read that JDBC is the most standard and common mechanism for accessing SQL data from Java. I want to know: is there any other mechanism for query data from ORACLE with Java code?

Thanks.
 
Old December 31st, 2004, 12:53 AM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think u can do this thru java code.but u shud first load a driver appropriate for ur database and jdk version you use.
then u have to open a connection between ur java code and database.
after you have done, in ur result set you can use sql sataements and update ur database.

a sample example will be like this.........

myResultSet = myStatement.executeQuery
(
"SELECT * from accountInformation" );
while(myResultSet.next()) {
System.out.print(myResultSet.getString(1)+" ");

try ur best
venki


 
Old January 3rd, 2005, 12:25 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use JNDI to set up a database for the application or use JDBC directly within your code. JNDI will allow you to use connection pooling and is simpler to use, once set up, read the Tomcat Documentation (accessable from the Tomcat startup page on 127.0.0.1 or http://localhost)

Should point out that JNDI still uses JDBC, JDBC is the way Java connects to databases, you MUST use it, what the tomcat documentation shows is one of TWO ways this can be done.

 
Old April 30th, 2005, 10:46 AM
Registered User
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Mallik8
Default

hai,
         There is no chance with out jdbc we can't get data from the db.
whether ur using the JNDI or something else no chance without jdbc.
only we can change the type of driver.
                                                      all the best .

P.Mallikharjuna Rao
 
Old May 5th, 2005, 02:46 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

You can simplyfy and make conventional method of accessing Oracle database using
Hibernate.


Gokulan Ethiraj





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection Problem with Java JDBC dontknowmuch SQL Server 2005 3 April 4th, 2006 01:51 PM
Connection to Oracle via JDBC swaminathanb Java Databases 3 August 9th, 2005 06:37 AM
connection to oracle thru jdbc venkitaraman Java Databases 5 April 6th, 2005 06:05 AM
Jdbc connection to oracle ClassNotFoundException jeffreak Java Databases 1 August 5th, 2004 12:37 AM
Exception connecting to Oracle Database with JDBC celia05es Java Databases 1 March 31st, 2004 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.