aspose file tools*
The moose likes Servlets and the fly likes Question about database access and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question about database access and JSP" Watch "Question about database access and JSP" New topic
Author

Question about database access and JSP

Rob Earls
Greenhorn

Joined: Sep 19, 2001
Posts: 12
Firstly, HI to everyone. I am a newbie JSP'er, hope to be able to help other newbies here, and get some info along the way!!
Now, on to the question.. ;)
I am evaluating whether to use PHP or JSP for my place of work. PHP seems to have a good set of Oracle OCI commands. I was wondering if JSP has anything similar.
At the moment I am using ODBC... i.e
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc: odbc:database_sid","name","pass")
But I am worried that this will tie us to an NT platform.
Is this true?

[This message has been edited by Rob Earls (edited September 19, 2001).]
Amit Agrawal
Ranch Hand

Joined: Aug 23, 2001
Posts: 282
Yes using odbc will bind you with windows but you don't need to use it. orcale provide much more powerfull jdbc thin driver(classes12). (you may download it from oracle's site).
than you can simply do..

This gives you platform independence, speed and more flexible access to database.
Originally posted by Rob Earls:
At the moment I am using ODBC... i.e
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc: odbc:database_sid","name","pass")
But I am worried that this will tie us to an NT platform.
Is this true?


[This message has been edited by Amit Agrawal* (edited September 19, 2001).]
Rob Earls
Greenhorn

Joined: Sep 19, 2001
Posts: 12
I must admit to having done a *little* research before I asked.
The trouble I have is that when I try to get drivers:
http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
They are only for NT or Solaris, therefore I thought I was not any better off.
I need something that will work on HPUX/AIX/Linux etc too.
( As you can tell I am a little confused!! )
Ashutosh Uprety
Ranch Hand

Joined: Nov 30, 2000
Posts: 39
hi,
i had recently in a proj with platform of AIX/win9x/NT. Things worked just fine for me.
I think u are missing something ... have u got class12.zip which will be used for oracle8i or classes111.zip for older versions of oracle ??
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Question about database access and JSP