aspose file tools*
The moose likes JDBC and the fly likes JDBC2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC2.0" Watch "JDBC2.0" New topic
Author

JDBC2.0

Chhaya Dhanani
Ranch Hand

Joined: Apr 11, 2001
Posts: 70
Hi,
I am new to this forum.
I have working with jdbc1.0 which comes along jdk1.2
I would like to know whether jdbc2.0 comes inbuilt with jdk1.3 as i would like use the methods that are supported by scrollable resultsets.
If no,from where can download it and what are the pre settings reqd so that java codes can run succesfully
Thanks
Chhaya
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
ya jdbc2.0 comes with JDK1.3 built in.
if u want support for oracle LOBs then u will ned specific oracle classes for that, which comes with oracle distribution
Chhaya Dhanani
Ranch Hand

Joined: Apr 11, 2001
Posts: 70
Thanks Prabhatis,
What i would like to know from where to download this Oracle Thin Driver and hoe to use it.If anyone would let me know in detail the procedure to find the machine id and the host, it would be great.
I have always worked with jdbcodbc driver. and would also like to know whether any special settings to be done to amke the Oracle thin driver available.
Thanks All
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
u can download the drivers from oracle site.
or i can send it to u ur mail if u won't mind.
just lemme know.
if u r using personal oracle then
usaually connection parameter will be as follows:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection dbCon = DriverManager.getConnection("jdbc racle:thin:@localhost:1521:local", "scott","tiger");
if u r using on network then u will need to know the name of server and the service name on the server.
anything else?
Prabhat kumar

[This message has been edited by Thomas Paul (edited April 13, 2001).]
Chhaya Dhanani
Ranch Hand

Joined: Apr 11, 2001
Posts: 70
Thanks Prabhat,
Yes, I would not mind if you mail the Oracle thin driver.
My mail ids are:
chhayand@hotmail.com
chhayand@rediffmail.com
I have the Oracle server name, but what is the service name?
if u can, please let me know the syntax:
Connection dbCon = DriverManager.getConnection("jdbc :Oracle:thin:@localhost:1521:local", "scott","tiger");
using Server name and service name.
Thanks once again
Manjunath B.S
Greenhorn

Joined: Apr 24, 2001
Posts: 16

Hello Prabhat,
Can you mail me the Oracle thin Driver?
My email Id id javaman@indiainfo.com.
Thanks a ton,
Manjunath b.S
nachiket deshpande
Ranch Hand

Joined: Oct 06, 2000
Posts: 114
Hello Prabhat!
I am new in this forum and JDBC. i have Personal Oracle7.3 loaded on my machine.i dont know how to get connectivity with my java programme.i read JDBC 2.0 from jdk1.3 documentation and tried some code but was not successful.please give full code about how to get connectivity.
What i tried is
String url="jdbc dbc:TABLE1;//TABLE1 is the name of my database
Connection con=DriverManager.getConnection(url,"username ","password");
In fact i dont know whether i have to load some drivers for JDBC?
please help!
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
Originally posted by nachiket deshpande:
please give full code about how to get connectivity.

ya the code goes like this ..
for personal oracle having installed the default database
u need to put the oracle jdbc drivers in the classpath
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection dbCon = DriverManager.getConnection("jdbc racle:thin:@localhost", "scott","tiger");
Statement stmt = dbCon.createStatement();
ResultSetrs = stmt.executeQuery("select * from emp"):
//process the resultser as u want
}
catch(Exception e){}
 
Consider Paul's rocket mass heater.
 
subject: JDBC2.0