Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

run query in the same time

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

i have a question..

is it possible to run query insert, update, delete in the same time in java?

if its possible could you please give me the example..

thanks & regards
 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "in the same time" mean?
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean as a single update, yes, you can chain them together in a single string if your driver supports batch queries. Although usually when you perform a batch operating all the queries are the same type. Having a batch operation of multiple different type (Select, insert, update) would create output akin to apples and oranges, as in its hard for the driver to know what to return. A lot of times it might just return the information from the last operation, so hopefully that's where you put the select.
 
Yudi Ono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Paul, i want to perform batch operating all query(insert, delete, update) in to one transaction, the purpose is to identified which query is fall and when it's fall i just have to rollback the transaction.

@Scott

Having a batch operation of multiple different type (Select, insert, update) would create output akin to apples and oranges , as in its hard for the driver to know what to return



hi scott is it possible to change the multiple different type query and turn it into atomic query and hold them in one transaction and it also check if one query fall, it will return error, and automatically the rollback transaction run?
 
Yudi Ono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yudi Ono wrote:hi..

i have a question..

is it possible to run query insert, update, delete at the same time in java?

if its possible could you please give me the example..

thanks & regards

 
Yudi Ono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yudi Ono wrote:hi..

i have a question..

is it possible to run query insert, update, delete at the same time in java?

if its possible could you please give me the example..

thanks & regards

 
Yudi Ono
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yudi Ono wrote:hi..

i have a question..

is it possible to run query insert, update, delete at the same time in java?

if its possible could you please give me the example..

thanks & regards

 
Oh. Hi guys! Look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic