• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when to use lock(-1) method

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am nearing the completion of this project and I haven't had to use the lock(-1) method to lock the entire database so far? What is it for?
Thanks,
Aruna.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am nearing the completion of this project and I haven't had to use the lock(-1) method to lock the entire database so far? What is it for?

There are several conspiracy theories about what lock(-1) is for. I think the most credible is that lock(-1) is called by administrator before the server is shut down so that some database mainanance can be performed. The good news is that although you have to implement it, you never need to call it.
Eugene.
[ January 13, 2003: Message edited by: Eugene Kononov ]
 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene,
I call lockDatabase when recNum = -1 in lock() method.

Thank you
Garandi
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I call lockDatabase when recNum = -1 in lock() method.

Right, but there is never a need to call lock(-1)
Eugene.
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think for this requirement, lock(-1) won't be used. But down the road, you may call lock(-1).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic