The following code creates new connection and recordset objects,
opens the connection, and then opens the recordset through the connection object.
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=
rs.Open "SELECT * FROM ARAF-PERSONNEL", cn, adOpenKeyset, adLockBatchOptimistic
There are numerous recordset type, and recordlocking options available through the open method on the recordset object. You can experiment with those.
Enjoy....!
for further details...
http://www.profsr.com/vb/vbless09.htm
No comments:
Post a Comment