Jun 9th, 2006, 09: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, 01: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.
Click Here to Expand Forum to Full Width
Survey posted by VBForums.