Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in database connectivity in JSP

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I came across a problec while I tried to connect with the database from JSP. That is I wrote like
Statement st = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
It shows errors as the two integer arguments are not valid. How to solve this? Plz help me.
Thanks in advance
Anbudan
K.Jeyaveerapandian
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like the JDBC driver you are using does not support that method. Note that JDBC 1.0, as supported by many drivers, only supports a no-argument createStatement() call. The createStatement call taking two integer parameters was only introduced in JDBC 1.2. You can see the JavaDoc here.
Can you tell us which driver version you are using and which database you are trying to access?
 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Carvar,
Thanks alot for your answer. But still I am having problems. That is I dont know what version of driver i am using. Please tell me what things should i do if i want to use jdbc 1.2? Now I wrote the program for the MS-Access database. But I want to switch over to Oracle. About the driver in my code I wtote like this,
Connection con= DriverManager.getConnection("jdbc dbc:myDSN");
Please help as I am in urgent need,
Thanks in advance,
Anbudan,
K.Jeyaveerapandian
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you tell us the JDK version you are using and the servlet processor you are using (Tomcat, Resin, Oracle iAS, etc.)
Best luck,
Edgar S´┐Żnchez

Originally posted by jeyaveera pandian:
Hi Carvar,
Thanks alot for your answer. But still I am having problems. That is I dont know what version of driver i am using. Please tell me what things should i do if i want to use jdbc 1.2? Now I wrote the program for the MS-Access database. But I want to switch over to Oracle. About the driver in my code I wtote like this,
Connection con= DriverManager.getConnection("jdbc dbc:myDSN");
Please help as I am in urgent need,
Thanks in advance,
Anbudan,
K.Jeyaveerapandian


 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought that might be the case. You are using the JDBC-ODBC bridge, which is generally regareded as being a rather weak implementation of an old JDBC version. If you are using, or planning to use, a modern, supported database such as Oracle, you really should get the latest JDBC driver from the database vendor. Oracle provide a JDBC 1.2 driver implementaion with the name "classes12_01.zip". You may already have it.
 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Edgar,
Thanks for your answer. I am using the JDK1.3 version and I am using the JWS. Now I am interested in using Weblogic Server. So please tell me suggestions fot that also.
Then this is for Carver. I thank you also. What to do with that "classes12_01.zip" to make my code run well. Plz reply me soon
Anbudan
K.Jeyaveerapandian
 
I once met a man from Nantucket. He had a tiny ad
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic