In VB6 how to lock a record in Pervasive2000i using Vaccess

I use Vaccess for all my programming in VB6 on a Netware 3.2 server, works perfect.
Now I a'm running in a situation that I have to lock certain records in a file to make sure whenone user has this open , other users can only read and not write untill unlocked.
What is the syntax for this?
Who is Participating?
mirtheilConnect With a Mentor Commented:
The SINGLE_NOWAIT_LOCK needs to be like this:
Status% = vDebnummer.GetEqual(SINGLE_NOWAIT_LOCK)
You could also do it like:
vDebnummer.GetEqual SINGLE_NOWAIT_LOCK
Status% = vDebnummer.status

It's how VB handles functions.
When you read the record, you need to add the appropriate lock bias.  
This link is for v9 but also applies to 2000i:

Here's a list of the lock biases as well:
# +100-Single wait record lock.
# +200-Single no-wait record lock.
# +300-Multiple wait record lock.
# +400-Multiple no-wait record lock.
BIAPROAuthor Commented:
true I did find that earlier, and  this in my source and  works ok,

Private Sub cmdtest_Click()
vDebnummer.FieldValue(0) = "JACK"
status% = vDebnummer.GetEqual           '  SINGLE_NOWAIT_LOCK

 BUT!!!!  as soon I unrem the  SINGLE_NOWAIT_LOCK in after enter
the VB6 will say
Compile error:
!!  Expected:  end of statement  

If status% = 0 Then
  vDebnummer.FieldValue(1) = "MY NAME at time:"  & date$ & " " &  time$
  status% = vDebnummer.Update
End If
end sub
BIAPROAuthor Commented:
True!  learning every day, Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.