Jun 9th, 2006, 08:41 PM
Use of adOpenDynamic,adLockOptimistic
HI Everyone... Can someone help me, what is the essence or the use of
Set rs3 = New ADODB.Recordset
rs3.Open "Select * from tEmployee", cn, adOpenDynamic, adLockOptimistic
I Frequently used the adOpenDynamic, adLockOptimistic in my SQL statement, but I just want to know the Distinction, I tried to search in Google but unfortunately I didnt found an answer.....
by the way im now in my six months in using Visual basic 6.0.
Hope u can help me..
Thank you ver much
Jun 12th, 2006, 12:49 PM
Re: Use of adOpenDynamic,adLockOptimistic
Moved from FAQ forum
The answer can be found in the Help files, simply type any of them into VB, then click on them and press F1.
In a nutshell:
The Open options basically specify whether you want to be able to "move around" the recordset or not (eg: rs.MovePrevious) rather than just forwards, and whether updates from other users are shown (after a .Requery).
The Lock options basically specify if changes can be made to the data, and how to deal with edits by other users for the same data.
It is a good idea to use the right options for your situation (use the Help to find out which), as it not only makes things faster, but also reduces the chances for issues with other users who are using the same database.
(2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015) . . . . . . . . Hitchhiker's Guide to Getting Help at VBForums
Classic VB FAQs (updated Oct 2010) ...Database Development FAQs/Tutorials (updated May 2011)
(includes fixing common VB errors) .......... (includes fixing common DB related errors, and [Classic VB] ADO tutorial /further steps, and [VB.Net] ADO.Net Tutorial).
Tutorial: How to automate Excel from VB6 (or VB5/VBA) .•. SQL 'Select' statement formatter/checker .•. Convert colour number to colour name .•. FlexGrid: fill from recordset .•. FlexGrid: AutoSize columns .•. DB Reserved Words checker
Connection strings .•. MDAC/Jet/ACE downloads .•. SQL Server downloads .•. MZTools (free upgrade for the VB6/VBA Editor)
Click Here to Expand Forum to Full Width
Survey posted by VBForums.