Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie questions on autocommit & locking record topic  RSS feed

 
Melinda Savoy
Ranch Hand
Posts: 387
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with the personal edition SQL Server DB on my own system. I am writing some JUNIT tests whereby I am trying to test for the following scenerio:

AutoCommit set to FALSE
BeginTransaction
ReadRecords(transID)
BeginTransaction AGAIN (should get a locked record) How can I get this to work since AutoCommit is turned off?

Is there a way to make this work?

Any help would be appreciated. Thank you.
[ September 12, 2005: Message edited by: Melinda Savoy ]
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37222
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Melinda,
I'm confused with what you are trying to do. Do you want to rollback to the state of the first transaction? If so, there is a rollback() method you can call. Or are you trying to have two transactions open at once? This can't be done and wouldn't make sense in my mind.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!