Hi !

I want to use an Access database for my VB 6.0 multi-user app.

Here is the big picture of my problem !!

This is my connection to an Access database.
Code:
Dim conAccess As ADODB.Connection
Dim strConnectionString as String

Set conAccess = New ADODB.Connection

strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\TestDB.mdb;"

conAccess.Open strConnectionString
This is the way I open a recordset
Code:
Dim rstRecord as ADODB.Recordset
Dim strSQL as String

Set rstRecord = New ADODB.Recordset

strSQL = "SELECT * FROM MYTABLE WHERE ..MYCONDITIONS.."  '( lets say it returns 3 records )

rstRecord.Open strSQL, conAccess, adOpenForwardOnly, adLockPessimistic

'Now .. i need to lock those records until that recordset is closed.
'The only way I found to do that is this line:
rstRecord(0) = rstRecord(0)
'It is kind of an Edit
'rstRecord.CancelUpdate allows me to unlock the data (see update below to view how I use it)
The problem with that is my whole table is locked and not only the 3 records selected. How can I have only my selected records (my recordset) locked.

Also, I don't feel I am doing this the best way. I feel my Edit technique is a turn around and not the proper way to do it.

And my updates are made this way.
Code:
Dim strSQL as String

strSQL = "UPDATE TABLE MYTABLE SET FIELD = VALUE, FIELD1 = VALUE1, FIELD2 = VALUE2 WHERE MY CONDITIONS ..."

'Unlock and Update
rstRecord.CancelUpdate
conAccess.Execute strSQL
Please help me !!
Don't send me MSDN text explaining Lock Types and blabla... I read that stuff already.

I need code exemple or hints that YOU used and that worked.