View Full Version : ADO Cursor Type/ Locking Type
charon
05-16-2003, 11:41 AM
hi,
I'm confused about them in the sense of :
1.) When we use Recordset method for manipulating the database, like SELECT/UPDATE/AddNew, they all sure involve "Cursor"???, means we must define cursor (implicit/explicit)???
2.) I can't imagine, when we do UPDATING, how the Cursor Location (Client/server) affects our transaction????
pls advice!!
Bluemonkey
05-16-2003, 03:48 PM
try have a look at
http://www.w3schools.com/ado/prop_cursorlocation.asp
Bullschmidt
05-21-2003, 01:59 PM
Cursor & LockType Performance Report - 6/27/1999
http://www.4guysfromrolla.com/webtech/062799-3.report.shtml
Test was done for inserting recs instead of just getting them.
Use adOpenForwardOnly cursor type (the default) whenever possible for speed, but use adOpenStatic if want to use objRS.MovePrev or objRS.RecordCount.
Use adLockReadOnly lock type (the default) whenever possible for speed, but use adLockOptimistic when updating and deleting or adLockPessimistic if leaving a recordset open for editing which of course one shouldn't do on the Web anyway.
[JPS Note: This article didn't say it but use adOpenKeyset cursor type (and probably adLockOptimistic lock type) if adding a new record and will be wanting to get the autonumber. The adOpenKeyset instead of adOpenForwardOnly cursor type may not be needed for a DSN-less connection but definitely IS needed for a DSN connection so might as well always use it if adding a new record and will be wanting to get the autonumber.]
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.