Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in database connectivity in JSP

 
jeyaveera pandian
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Edgar Sanchez
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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: 6920
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic