• 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

Executing a batch of SQL commands

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In my application,I'm actually need to collect a list of SQL commands(Normal update,delete as well as Calls to Stored Procedure) together by then execute the selected ones from the list and execute them to the Database and commit. I collect these statements after I execute each of them,see their effect and rollback immediately.Then the user can look at the commands required and select them and execute or rollback depending on whether they like the resultant effect or not. I'm actually storing the sql command Strings
together in a list.

So,I'm facing two problems in doing this.

1. It seems that executing a Stored Procedure is only through a CallableStatement.How can I achieve the SQL command for this to solve my purpose?

2. How can execute a batch of such statements together?

thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic