Record Locking, SQL Server 6.5 
Author Message
 Record Locking, SQL Server 6.5

Greetings.

I'm using VB4.0a/SQL Server 6.5 on a current project.
I'm trying to implement on the front-end, an EDIT, SAVE CHANGES, UNDO
CHANGES, etc. style interface. In order to EDIT a particular record,
my program needs to detect whether there is a current lock on that
particular record / page. If there is, then I could maybe inform the
user they cannot edit, but can view the record instead.

I realise that this might not be what SQL Server is for, with it's
default optimistic locking but I've really only got to get past this
final hurdle and it's done! Having one user's amendments overwrite the
other's is not going to go down too well!

No more remote data controls in my project, everything is in code.
(Yep, I learnt the hard way first!)

So, I need to be able to :

1) Detect whether a record/page is locked
2) If not, Lock it for the duration of the edit operation (ie. until
the user has either hit Save or Cancel)
3) Release the Lock

If anyone has been down this road before, please tell me how you did
it!!!

Regards,

Chris Woodworth
Software Engineer
Fujitsu Australia Limited

PS. If anyone needs code for a "pretend" RDC, with first, previous,
next and last buttons for navigation which works much quicker, give me
a yell.



Sat, 30 Oct 1999 03:00:00 GMT  
 Record Locking, SQL Server 6.5

Quote:
> No more remote data controls in my project, everything is in code.
> (Yep, I learnt the hard way first!)

Hi Chris,
        Sorry, I can't help with your problem as I am new to SQL Server 6.5. I do
have a couple of questions about your above comment though. I'm guessing
you now use ODBC API calls? Is it really that much faster? I wonder how
hard it would be to go from RDO or ODBC to ADO or OLEDB. I hear you can get
ODBC drivers that link directly to OLEDB. I wonder if that would be any
faster. It seems that ADO is still not completed and not available for VB
yet.

Troy Makaro



Sat, 30 Oct 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Record Locking in MS SQL Server 6.5

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

3. SQL Server 6.5 Locking

4. Get Username or Computername after lock (or deadlock) errors from MS SQL server (7 or 6.5)

5. ADO's Connection.beginTran will lock SQL Server 6.5

6. Problem With Inserting Over 1200o records into SQL server 6.5

7. * vb5/ado20 Can't view record in sql server 6.5

8. VB4.0 Insert Record SQL Server 6.5

9. * vb5/ado20 Can't see record in sql server 6.5

10. Select first 10 records in SQL Server 6.5?

11. New Transact-SQL Debugger for Microsoft SQL Server 6.5/7.0

12. Import text file in SQL Server 6.5 via SQL in Visual Basic

 

 
Powered by phpBB® Forum Software