• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Urgent - Transaction

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In sybase (TSQL),"BEGIN TRANSACTION" and "COMMIT TRANSACTION" is used for transaction control.
Are these two statements valid for Oracle, Informix or any other DB also?
Actually the problem is that for managing transcations I was using JDBC methods - setAutoCommit(),rollback() and commit(). But it caused some conflict with stored procedure setting. The DBA is asking me to use "BEGIN TRANSACTION" and "COMMIT TRANSACTION" instead.
Statement.executeUpdate("BEGIN TRANSACTION");
But will this not make by code Database dependent? The advantage of using JDBC is that you can change the DB layer without affecting the code. I am not sure but if I put these statements in my code, will it not make it sybase specific?
I will appreciate an early reply on this.
[ September 04, 2002: Message edited by: Snigdha Solanki ]
[ September 04, 2002: Message edited by: Snigdha Solanki ]
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid much Transaction management is Sybase specific. For example, Oracle transaction management is provided mainly through the two SQL statements: COMMIT and ROLLBACK. Other commands related to transaction management include: SAVEPOINT, SET TRANSACTION, and SET AUTOCOMMIT.
Oh, the problems of portability!
 
Have you no shame? Have you no decency? Have you no tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic