Mega Code Archive

 
Categories / VisualBasic Script / Access
 

Supplying the CursorType as a Parameter of the Open Method

Sub StaticRecordset1()     Dim rst As ADODB.Recordset     Set rst = New ADODB.Recordset     rst.ActiveConnection = CurrentProject.Connection     rst.Open "Select * from Employees", CursorType:=adOpenStatic     Debug.Print rst.RecordCount     rst.Close     Set rst = Nothing End Sub