• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

rs.updateInt() not working. . please help

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody... i have a program code which needs to update the fields provided by the user . i am doing something like this.. i have a mysql table which has 27 rows and 20 columns in each row.


<%
String url="jdbc:mysql://localhost:3306/vikh?user=root&password=admin";

con=DriverManager.getConnection(url);
stmt=con.createStatement();
rst=stmt.executeQuery("select * from it_21;");
while(rst.next())
{

out.print("inside while"); //this is getting displayed

rst.updateInt(3,123445); // the program flow is stopping at this point.

rst.updateRow();

out.print("In while"); // this is not getting displayed

}

---- rest of the code ------

%> Thanks in advnace
 
Author
Posts: 531
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to create an update-able ResultSet, something similar to



The ResultSet object will be forward only meaning that you can not go backward in the ResultSet by calling previous() method.
 
vikhyath reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Masoud ... Im a newbie so learning things ... thanks once again ! : )
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic