Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 22nd, 2007, 01:11 PM
Registered User
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default LockType Property of the RecordSet Class

I am accessing a database for readonly purposes, and do not want to interfere with anyone that might be trying to access and/or modify the same data. I have set Connection.Mode = adModeShareDenyNone and have used the default RecordSet.LockType = adLockReadOnly. I am not sure whether the adLockReadOnly prevents other people form modifying the data or if it only prevents me from modifying the data.

Thanks in advance.

Old August 22nd, 2007, 01:37 PM
Friend of Wrox
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post


The LockType is only based on that particular Recordset.

The defacto standard for Recordsets like this is to use a Read-Only-Forward-Only (ROFO) cursor. So set the LockType to adLockReadOnly and the CursorType to adOpenForwardOnly.


The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with LockType property dslagle2 BOOK: Excel 2003 VBA Programmer's Reference 0 August 22nd, 2007 12:33 PM
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Get all property values of class rrhandle ASP.NET 1.0 and 1.1 Basics 1 January 12th, 2006 05:13 PM
Access to a property in the class. AyatKh ASP.NET 1.0 and 1.1 Basics 2 December 18th, 2003 11:25 AM
Project.Class.Property.? Jstmehr4u3 Pro VB 6 2 June 11th, 2003 11:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.