• 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

Getting current row

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All!
After doing a query on a database, i do the following:
while (rs.next())
{
salvage everything from the current row.
move the current row to a master table
}
question:
what method should i use in order to select the current row and move it to the master table?
is there a short way aside from the following?
command = "insert into <master> " +
"( " +
"field1 " +
"field2 " +
"field3 " +
") " +
"values " +
"( " +
rs.getString("field1") + ", " +
rs.getString("field2") + ", " +
rs.getString("field3") + ", " +
") "
i know that there should be an api that has a method that would simply allow you to select the content of the whole row.
tia
jacq carballo
reply
    Bookmark Topic Watch Topic
  • New Topic