• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie questions on autocommit & locking record topic

 
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
Marshal
Posts: 35276
384
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic