VB5 & SQL Server 6.5 
Author Message
 VB5 & SQL Server 6.5

I am trying to lock a single record in one table & keep other users from
editing this same record.

All I need is an error code from VB when one user tries to edit a record
that is already loced from VB.  I am using DAO 3.5.

I have been successful using the following code for MS Access databases, but
I have not been able to succesfully lock a record in SQL Server 6.5.

sql = "select all * from oaProperty where PropID = 'aaa' and VersionID = 1"
Set rstData = source_db.OpenRecordset(sql, dbOpenDynaset, dbPessimistic)
rstData.LockEdits = True
rstData.Edit

In fact, using the Edit method of a recordset produces a VB runtime error
{3027} when applied to SQL Server 6.5 everytime.  I know the database is not
readonly, because the Execute method of the database object works when
executing an Insert SQL statement for SQL Server 6.5.

Any help and/or assistance would be appreciated.

Thanks.
Roy.



Fri, 09 Jun 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB5 & SQL Server 6.5

2. VB 6.0 & SQl server 6.5

3. VB & SQL Server 6.5 Contract

4. Visual Basic & SQL server 6.5

5. VB 6.0 & SQL Server 6.5

6. SQL Server 6.5 & VB6 ADO

7. VB6: Data Environment & SQL Server 6.5

8. NEWBIE:VB & SQL Server 6.5 Bound Controls

9. VB 4.0 & SQL Server 6.5 (Identity Column)

10. VB 5.0 & Stored Procedure (SQL Server 6.5)

11. VB3, Intersolv MultiLink VB & SQL Server 6.5

12. Locking in VB5 and SQL Server 6.5 using stored procs

 

 
Powered by phpBB® Forum Software